Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b06eed3
commit 68d7032
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
src | ||
test | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: [ | ||
require("babel-plugin-syntax-trailing-function-commas"), | ||
require("babel-plugin-transform-async-to-generator") | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
} |