babel-preset-nodejs

6.0.0 • Public • Published

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
      }
    }]
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i babel-preset-nodejs

Weekly Downloads

82

Version

6.0.0

License

MIT

Last publish

Collaborators

  • char1ee