Reputation: 24059
I have checked out gulpif and various other posts, but they only state how to do this inside a task.
I want to be able to have an if statement to decide which task in a series to run, something like:
gulp.task('build',
gulp.series(task1, task2, task3, if(true){task 4} else {task5}));
Upvotes: 1
Views: 813
Reputation: 177
This should work:
gulp.series(task1, task2, task3, condition ? task4 : task5);
Upvotes: 2