Compile with babel only when file changed from last time.
$ npm install ababel --save
'use strict'
const ababel = require('ababel')
void async function () {
await ababel('**/*.jsx', {
cwd: 'src',
out: 'dest',
minified: true,
presets: ['es2015', 'react']
})
}().catch((err) => console.error(err))
ababel(pattern, options) -> Promise
Name | Type | Description |
---|---|---|
pattern | string | Glob file name pattern |
options | Object | Optional settings |
options.cwd | string | Current working directory path |
options.out | string | Output directory path |
options.minified | boolean | Minified or not |
options.reflects | string[] | File patterns to reflects changes |
This software is released under the MIT License.