gulp-nim
v1.3.0
Published
Gulp plugin to compile Nim files.
Downloads
13
Readme
gulp-nim
Gulp plugin to compile Nim files.
Installation
npm i -D gulp-nim
Usage
gulpfile.js
const { src, dest } = require('gulp')
const nim = require('gulp-nim')
exports.default = function() {
return src('./src/nim/app.nim')
.pipe(nim({ d: 'release', opt: 'size', colors: true, skipCfg: '' }))
.pipe(dest('./script'))
}
API
nim([opts])
Compiles Nim source code files to JavaScript files.
opts
is an object of compiler options.
Each of key-value pairs corresponds to one compiler option.
{d: 'release'}
means -d:release
, {opt: 'size'}
means --opt:size
, {colors: true}
means --colors:on
, and {skipCfg: ''}
means --skipCfg
.
For more details, see Nim Compiler User Guide.
Multiple value support
Values of opts
allow multiple values.
For example, {d: ['release', 'nodejs']}
means -d:release -d:nodejs
.
License
Apache-2.0