Behance babel presets
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test excluding regenerator-transform by default (#11) Jan 5, 2017
.eslintrc Add ability to specify target for included transforms Oct 5, 2016
.gitignore init Jun 9, 2016
.travis.yml Update .travis.yml Nov 18, 2016
LICENSE init Jun 9, 2016
README.md add mention of transform-regenerator to readme [skip ci] Jan 5, 2017
index.js excluding regenerator-transform by default (#11) Jan 5, 2017
package.json

README.md

babel-preset-behance npm travis

Babel preset for Behance

Install

$ npm install --save-dev babel-preset-behance

Usage

Via .babelrc (Recommended)

.babelrc

{
  "presets": ["behance"]
}

Via CLI

$ babel script.js --presets behance

Via Node API

require("babel-core").transform("code", {
  presets: ["behance"]
});

Options

We currently exclude transform-regenerator by default.

  • browser (true by default) - Enable browser specific presets and transforms.
  • env (undefined by default) - Pass down env options to babel-preset-env. See the babel-preset-env docs for more info.
{
  "presets": ["behance", { "browser": true }]
}
{
  "presets": ["behance", { "browser": false }]
}
{
  "presets": ["behance", {
    "browser": false,
    "env": {
      "targets": {
        "chrome": 55
      }
    }
  }]
}
{
  "presets": ["behance", {
    "browser": false,
    "env": {
      "targets": {
        "node": "current"
      }
    }
  }]
}