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.
Hi, I’m Max! I'm a fullstack JavaScript developer living in Berlin.
When I’m not working on one of my personal projects, writing blog posts or making YouTube videos, I help my clients bring their ideas to life as a freelance web developer.
If you need help on a project, please reach out and let's work together.
To stay updated with new blog posts, follow me on Twitter or subscribe to my RSS feed.