If you'd like to write your gulpfile with the newest ECMAScript 6 language features for JavaScript, there is a really simple way to do this.
First, install babel
and gulp
in locally:
$ npm i babel gulp -D
Then, add the following script to your package.json
:
JSON
{"scripts": {"gulp": "babel-node ./node_modules/.bin/gulp"}}
Now, instead of just typing gulp
, you can now do:
$ npm run gulp
This also has the advantage that it removes the dependency on a globally installed gulp.