I currently have two tasks, that both compile sass files. I would still like to concat the two directories into separate files but it seems that it would be more maintainabl
Solution 1:
gulp.task('sass', function() {
gulp.start('bootstrap-sass', 'site-sass');
})
gulp.start runs tasks in parallel. And it's asynchronous, which means 'bootstrap-sass' may be finished before 'site-sass'. But it's not recommended because
gulp.start is undocumented on purpose because it can lead to complicated build files and we don't want people using it
see https://github.com/gulpjs/gulp/issues/426
Solution 2:
var runSequence = require('run-sequence');
gulp.task('sass', function (cb) {
runSequence(['bootstrap-sass', 'site-sass'], cb);
});
run-sequence is a gulp plugin.
Runs a sequence of gulp tasks in the specified order. This function is designed to solve the situation where you have defined run-order, but choose not to or cannot use dependencies.
runSequence(['bootstrap-sass', 'site-sass'], cb);
This line runs 'boostrap-sass' and 'site-sass' in parallel.If you want to run tasks serially, you can
runSequence('bootstrap-sass', 'site-sass', cb);