Here is a composed task I don\'t know how to replace it with task dependencies.
...
gulp.task(\'watch\', function () {
var server = function(){
gulp.run(\
If you need to maintain the order of running tasks you can define dependencies as described here - you just need to return stream from the dependency:
gulp.task('dependency', function () {
return gulp.src('glob')
.pipe(plumber())
.pipe(otherPlugin())
.pipe(gulp.dest('destination'));
});
Define the task that depends on it:
gulp.task('depends', [ 'dependency' ], function () {
// do work
});
And use it from watch:
gulp.task('watch', function () {
watch('glob', [ 'depends' ]);
});
Now the dependecy
task will complete before depends
runs (for example your 'jasmine' and 'embed' tasks would be dependencies and you'd have another task 'server' that would depend on them). No need for any hacks.