145
rated 0 times
[
151]
[
6]
/ answers: 1 / hits: 22442
/ 9 Years ago, tue, march 24, 2015, 12:00:00
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?
More From » node.js