gulp-redis-lua2js

4.0.3 • Public • Published

gulp-redis-lua2js

Build Status npm package Coverage Status

Convert lua scripts to node modules using redis-lua2js

Install

$ npm install --save-dev gulp-redis-lua2js

Usage

Convert pdel.lua to pdel.js:

import gulp from 'gulp';
import lua2js from 'gulp-redis-lua2js';

gulp.task('lua', function() {
  // Backend locales
  return gulp.src('pdel.lua')
  .pipe(lua2js())
  .pipe(gulp.dest('lua'));
});

For a real life example, check redis-pdel

API

lua2js({ useFilenameAsName, ...options })

Converts the given lua scripts into node modules.

useFilenameAsName

Type: boolean, default: true, if no name was explicitly specified in the options, use the filename (without lua extension) as the name of the command when converting

options

The options to lua2js documented in redis-lua2js

License

See the LICENSE file for license rights and limitations (MIT).

Package Sidebar

Install

npm i gulp-redis-lua2js

Weekly Downloads

0

Version

4.0.3

License

MIT

Unpacked Size

5.12 kB

Total Files

4

Last publish

Collaborators

  • perrin4869
  • 20lives