babel-preset-es2015-node6
Babel preset to make node@6 fully ES2015 compatible
Last updated 4 years ago by jhen0409 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install babel-preset-es2015-node6 
SYNC missed versions from official npm registry.

babel-preset-es2015-node6

Babel preset to make node@6 fully ES2015 compatible.

Node@6 has great ES2015 support, this module just adds missing features:

Install

$ npm install --save-dev babel-preset-es2015-node6

Usage

Read "Configuring Babel 6" article for more information about babel@6 configuration.

NOTE If you're using object-rest feature of stage-2, use es2015-node6/object-rest instead of es2015-node6 (It's added back destructuring, parameters), or down to ^0.1.4. Waiting #2, T7086 fix.

Via .babelrc (recommended)

.babelrc

{
  "presets": ["es2015-node6"]
}

Via CLI

babel script.js --presets es2015-node6

Via Node API

require('babel-core').transform('code', {
  presets: ['es2015-node6'],
})

Options

  • loose - Enable "loose" transformations for any plugins in this preset that allow them (Disabled by default).
  • funcName - If your node version is less than 6.5, consider enabling function name support.
{
  presets: [
    ["es2015-node6", { "loose": true }]
  ]
}

Credits

License

MIT

Current Tags

  • 0.4.0                                ...           latest (4 years ago)

8 Versions

  • 0.4.0                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago

Copyright 2014 - 2016 © taobao.org |