Max SchmittMS
1st July 2015

How to write your gulpfile using ES6

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:

{
"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.


Need help on a project?

I'm available for freelance work.
Send me an email! Or find out more about my services.