Question: How can I write my gulp file in ES6 so I can use import instead of require and use => syntax over
I use babel-node and native gulp.
babel and gulp as devDependencies.gulpfile.js with ES6 syntax../node_modules/.bin/babel-node ./node_modules/.bin/gulp to run gulpscripts section, you can skip the first ./node_modules/.bin/ part - as babel-node ./node_modules/.bin/gulp.The advantage of this appoach is, one day when the node.js support all ES6 features one day, all you need to opt-out babel runtime is to replace babel-node with node. That is all.