Last active
August 29, 2015 14:01
-
-
Save magsout/8c7e5d910c6c4f09c0d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
// takes in a callback so the engine knows when it'll be done | |
gulp.task('one', function(cb) { | |
// do stuff -- async or otherwise | |
cb(err); // if err is not null and not undefined, the orchestration will stop, and 'two' will not run | |
}); | |
// identifies a dependent task must be complete before this one begins | |
gulp.task('two', ['one'], function() { | |
// task 'one' is done now | |
}); | |
gulp.task('three', ['two'], function() { | |
// task 'two' is done now | |
}); | |
gulp.task('four', ['three'], function() { | |
// task 'three' is done now | |
}); |
Par contre tout ce qui est dans l'array va se paralléliser ? Zip et doc vont se paralléliser aussi entre eux ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pas forcément tu peux aussi procéder comme ça :
Ici l'avantage c'est que je peux run mes tâches en parallèle. Par contre Zip et doc ne vont démarrer qu'une fois le set de tâches dans l'array terminé.