S
S
Sergey2015-12-26 22:01:48
JavaScript
Sergey, 2015-12-26 22:01:48

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

1 answer(s)
S
Sergey, 2015-12-26
@Sergamers

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 question

Ask a Question

731 491 924 answers to any question