ababel
v6.1.5
Published
Compile with babel only when file changed from last time.
Downloads
2,819
Readme
ababel
Compile with babel only when file changed from last time.
Installation
$ npm install ababel --save
Usage
'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))
Signature
ababel(pattern, options) -> Promise
Params
| 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 |
License
This software is released under the MIT License.