in the snippet like this:
gulp.task \"coffee\", ->
gulp.src(\"src/server/**/*.coffee\")
.pipe(coffee {bare: true}).on(\"error\",gutil.log)
I was searching for this answer for a while. Now I got it in the official gulp documentation.
If you want to perform a gulp task when the last one is complete, you have to return a stream:
gulp.task('wiredep', ['dev-jade'], function () {
var stream = gulp.src(paths.output + '*.html')
.pipe($.wiredep())
.pipe(gulp.dest(paths.output));
return stream; // execute next task when this is completed
});
// First will execute and complete wiredep task
gulp.task('prod-jade', ['wiredep'], function() {
gulp.src(paths.output + '**/*.html')
.pipe($.minifyHtml())
.pipe(gulp.dest(paths.output));
});