gulp-redis-lua2js
v5.0.0
Published
Convert lua scripts to node modules
Downloads
73
Readme
gulp-redis-lua2js
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).