Gulp task - zhentian-wan/MEANAppsFiles GitHub Wiki
Gulp runs the default task by default.
var runSequence = require('run-sequence');
gulp.task('default', function(callback){
runSequence('build', callback);
})
Because gulp can run the tasks async, so we can use run-sequence lib. We need to provide a callback as a async hint to tell gulp using async.
The hint can be a string, function and callback.
gulp.task('build', function(callback) {
runSequence('clean', 'copy-build', callback);
});
gulp.task('clean', function() {
});
gulp.task('copy-build', ['copy-assets','copy-js','copy-vendor-js']);
gulp.task('copy-assets', function() {
});
gulp.task('copy-js', function() {
});
gulp.task('copy-vendor-js', function() {
});
In 'build' task, we run 'clean' task first then 'copy-build'.
In 'copy-build', we define three sub-tasks which copy-build should work.