Is there a way to specify a gulp task depending on the NODE_ENV
that is set?
For example in my package.json
file, I have something like:
"scripts": {
"start": "gulp"
}
And I have multiple gulp
tasks
gulp.task('development', function () {
// run dev related tasks like watch
});
gulp.task('production', function () {
// run prod related tasks
});
If I set NODE_ENV=production npm start
, can I specify to only run gulp production
? Or is there a better way to do this?