babel-preset-es2015-node4

Babel preset to make node@4 ES2015 compatible.

Use npmjs.org/babel-preset-env instead, see https://github.com/babel/babel-preset-env
Last updated 3 years ago by jbach .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install babel-preset-es2015-node4 
SYNC missed versions from official npm registry.

babel-preset-es2015-node4 (DEPRECATED)

Babel preset to make node@4 ES2015 compatible.

DEPRECATED: Use the awesome babel-preset-env!

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

  • destructing assignment
  • rest & default parameters
  • modules
  • unicode and sticky regular expressions
  • spread operator
  • function.name

Does not include regenerator!

You can not blacklist plugins in babel@6. To avoid cruft, this preset does not include full Generators support via regenerator.

If you rely on %GeneratorPrototype%.return, yield *, iterator closing or yield *, iterator closing via throw() (see compat table), you will have to npm install and include regenerator yourself:

{
	"presets": ["es2015-node4"],
	"plugins": ["transform-regenerator"]
}

Install

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

Usage

Via .babelrc (recommended)

.babelrc

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

Via CLI

$ babel script.js --preset es2015-node4

Via Node API

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

License

MIT

Current Tags

  • 2.1.1                                ...           latest (3 years ago)

8 Versions

  • 2.1.1 [deprecated]           ...           3 years ago
  • 2.1.0 [deprecated]           ...           4 years ago
  • 2.0.3 [deprecated]           ...           4 years ago
  • 2.0.2 [deprecated]           ...           4 years ago
  • 2.0.1 [deprecated]           ...           4 years ago
  • 2.0.0 [deprecated]           ...           4 years ago
  • 1.0.1 [deprecated]           ...           4 years ago
  • 1.0.0 [deprecated]           ...           4 years ago

Copyright 2014 - 2016 © taobao.org |