Skip to content

Latest commit

 

History

History
72 lines (57 loc) · 1.32 KB

README.md

File metadata and controls

72 lines (57 loc) · 1.32 KB

babel-preset-behance npm travis

Babel preset for Behance

  • We currently exclude transform-regenerator by default.
  • modules is false by default (for webpack >= 2)
  • Stage 3 is included
  • istanbul are in the test environment

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

{
  "presets": ["behance", {
    "env": {
      "modules": "commonjs"
    }
  }]
}
{
  "presets": ["behance", {
    "env": {
      "targets": {
        "chrome": 55
      }
    }
  }]
}
{
  "presets": ["behance", {
    "env": {
      "targets": {
        "node": "current"
      }
    }
  }]
}