Skip to content

Commit

Permalink
Add es2017-preset (#3624)
Browse files Browse the repository at this point in the history
  • Loading branch information
sotayamashita authored and hzoo committed Aug 23, 2016
1 parent b06eed3 commit 68d7032
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/babel-preset-es2017/.npmignore
@@ -0,0 +1,3 @@
src
test
node_modules
35 changes: 35 additions & 0 deletions packages/babel-preset-es2017/README.md
@@ -0,0 +1,35 @@
# babel-preset-es2017

> Babel preset for all es2017 plugins.
## Install

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

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

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

### Via CLI

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

### Via Node API

```javascript
require("babel-core").transform("code", {
presets: ["es2017"]
});
```
6 changes: 6 additions & 0 deletions packages/babel-preset-es2017/index.js
@@ -0,0 +1,6 @@
module.exports = {
plugins: [
require("babel-plugin-syntax-trailing-function-commas"),
require("babel-plugin-transform-async-to-generator")
]
};
14 changes: 14 additions & 0 deletions packages/babel-preset-es2017/package.json
@@ -0,0 +1,14 @@
{
"name": "babel-preset-es2017",
"version": "0.0.1",
"description": "Babel preset for all es2017 plugins.",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"license": "MIT",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-preset-es2017",
"main": "index.js",
"dependencies": {
"babel-plugin-syntax-trailing-function-commas": "^6.8.0",
"babel-plugin-transform-async-to-generator": "^6.8.0"
}
}

0 comments on commit 68d7032

Please sign in to comment.