Skip to content

Commit

Permalink
Add es2016 preset (babel#3531)
Browse files Browse the repository at this point in the history
  • Loading branch information
chicoxyzzy authored and hzoo committed Jun 22, 2016
1 parent 17ce0a5 commit 8fef2bc
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/babel-preset-es2016/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
src
test
node_modules
35 changes: 35 additions & 0 deletions packages/babel-preset-es2016/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# babel-preset-es2016

> Babel preset for all es2016 plugins.
## Install

```sh
$ npm install --save-dev babel-preset-es2016
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
"presets": ["es2016"]
}
```

### Via CLI

```sh
$ babel script.js --presets es2016
```

### Via Node API

```javascript
require("babel-core").transform("code", {
presets: ["es2016"]
});
```
5 changes: 5 additions & 0 deletions packages/babel-preset-es2016/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: [
require("babel-plugin-syntax-exponentiation-operator"),
]
};
13 changes: 13 additions & 0 deletions packages/babel-preset-es2016/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "babel-preset-es2016",
"version": "6.9.0",
"description": "Babel preset for all es2016 plugins.",
"author": "Sebastian McKenzie <[email protected]>",
"homepage": "https://babeljs.io/",
"license": "MIT",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-preset-es2016",
"main": "index.js",
"dependencies": {
"babel-plugin-transform-exponentiation-operator": "^6.3.13"
}
}

0 comments on commit 8fef2bc

Please sign in to comment.