@umayr/babel-preset-es2017-node7
v0.1.0
Published
Babel preset to make node@7 ES2017 compatible
Downloads
6
Maintainers
Readme
babel-preset-es2017-node7
Babel preset to make node@7 ES2017 compatible.
Node@7 has great ES2017 support, and this module just adds missing features:
- modules (transform-es2015-modules-commonjs)
- class properties (transform-class-properties)
- object rest spread (syntax-object-rest-spread)
- trailing function commas (syntax-trailing-function-commas)
- async to generator (transform-async-to-generator)
Install
$ npm install --save-dev babel-preset-es2017-node7
Usage
Read "Configuring Babel 6" article for more information about babel@6 configuration.
Node run
node script.js
Via .babelrc
(recommended)
.babelrc
{
"presets": ["es2017-node7"]
}
Via CLI
babel script.js --presets es2017-node7
Via Node API
require('babel-core').transform('code', {
presets: ['es2017-node7'],
})
Credits
- Inspired by babel-preset-es2015-node6