Skip to content

Commit

Permalink
Docs: Update the babel dependencies to install & configuration needed (
Browse files Browse the repository at this point in the history
…closes #2136)
  • Loading branch information
phated committed Nov 19, 2018
1 parent c641369 commit 7239cf1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,21 @@ gulp.task('default', build);

## Use latest JavaScript version in your gulpfile

Node already supports a lot of **ES2015**, to avoid compatibility problem we suggest to install Babel and rename your `gulpfile.js` as `gulpfile.babel.js`.
Node already supports a lot of __ES2015+__ features, but to avoid compatibility problems we suggest to install Babel and rename your `gulpfile.js` as `gulpfile.babel.js`.

```sh
npm install --save-dev babel-register babel-preset-es2015
npm install --save-dev @babel/register @babel/core @babel/preset-env
```

Then create a **.babelrc** file with the preset configuration.

```js
{
"presets": [ "es2015" ]
"presets": [ "@babel/preset-env" ]
}
```

And here's the same sample from above written in **ES2015**.
And here's the same sample from above written in **ES2015+**.

```js
import gulp from 'gulp';
Expand Down

0 comments on commit 7239cf1

Please sign in to comment.