babel-preset-nodejs
v6.0.0
Published
Babel preset for nodejs
Downloads
549
Readme
babel-preset-nodejs
Babel preset for nodejs
Install
npm install --save-dev babel-preset-nodejs
Usage
Via .babelrc
(Recommended)
.babelrc
{
"presets": ["nodejs"]
}
Via CLI
babel script.js --presets nodejs
Via Node API
require('babel-core').transform('code', {
presets: ['nodejs']
});
Options
target
node number
, defaults to 4
.
{
"presets": [
["nodejs", {
"targets": {
"node": 7
}
}]
]
}