Answer the question
In order to leave comments, you need to log in
How to replace gulp.run?
Surely you have come across such a record as
gulp.run() has been deprecated. Use task dependencies or gulp.watch task triggering instead.How can I change the launch of such
var beats_task = require('./gulp/beats');
global.options = parseArgs(process.argv.slice(2));
gulp.task('run-beats', () => {
if(global.options.prod){
gulp.run(beats_task.prod);
}else{
gulp.run(beats_task.dev);
}
});
Answer the question
In order to leave comments, you need to log in
https://www.npmjs.com/package/gulp-sequence
in gulp4 they replaced the scheduler, and now gulp.run is not needed, everyone replaced the combinations from parallel/series.
Your case is even simpler:
gulp.task('run-beats', global.options.prod ?
beats_task.prod : beats_task.dev
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question