GitXplorerGitXplorer
j

babel-preset-es2015-node6

public
132 stars
5 forks
3 issues

Commits

List of commits on branch master.
Unverified
977829789eda91b8c3d320721754bd01f1b4bc03

object rest spread now well supported (#9)

rrgbkrk committed 8 years ago
Unverified
00ce2fe861fc0d4f152cc31c26897e391e628d82

v0.4.0

jjhen0409 committed 8 years ago
Unverified
870a2f7f0cbd1f5d50f6961ff7c02569ba6a8a8e

Disable function-name by default & add `funcName` for enable

jjhen0409 committed 8 years ago
Unverified
1b13dd19ef03770991b2b2c3a05ff8667573dc19

v0.3.0

jjhen0409 committed 8 years ago
Unverified
1ea2551fb373cecf6b727d6ca36005f924d4118d

Merge pull request #6 from jhen0409/opts

jjhen0409 committed 8 years ago
Unverified
66a726f48650c96cc980484991dc5c32b06ba621

Update README for preset options

jjhen0409 committed 8 years ago

README

The README file for this repository.

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.

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