mincer-babel-engine
installation
$ npm install mincer-babel-engine
usage
var babelEngine = require('mincer-babel-engine');var Mincer = require('mincer'); babelEngine(Mincer);
Lib Function
babelEngine(mincer [,options] [,babel-core])
var babelEngine = require('mincer-babel-engine');var mincer = require('mincer');var babelCore = require('babel-core'); // examplesbabelEngine(mincer); // with mincerbabelEngine(mincer, {}); // with mincer and optionsbabelEngine(mincer, {}, babel); // with mincer, options and own babel-core
options
extensions
Supported extensions by this engine. (Array
of Strings. Default:['.es6']
)babel
Babel options to use for transform. (Object
. Default:{}
)
configure
Mincer.BabelEngine.configure(options)
// ...Mincer.BabelEngine.configure({ preset: ['es2015']});
Hint: The object in configure is passed to babel
property of engine options.
Contribute
- Bug? Missing Feature? Open Issue!
- or Fork, Implement and open Pull Request