Skip to content Skip to sidebar Skip to footer

Gulp Tasks From Within Other Gulp Tasks?

I have a Gulp build task that is made up of other build tasks similar to this: gulp.task('build', ['build-html', 'build-css', 'build-js', 'build-images']); The thing I hate about

Solution 1:

I guess you could use the runSequence plugin to do what you want.

Since the only purpose of your build task is to launch all the build-* tasks with no specific order, this can look like:

var rs = require('run-sequence');

gulp.task('build', function (cb) {
  rs(['build-css', 'build-html', 'build-js', 'build-images'], cb);
});

Post a Comment for "Gulp Tasks From Within Other Gulp Tasks?"