Skip to content

Instantly share code, notes, and snippets.

@AllThingsSmitty
Last active August 29, 2015 14:16
Show Gist options
  • Save AllThingsSmitty/6a4ee8e07735e34c247c to your computer and use it in GitHub Desktop.
Save AllThingsSmitty/6a4ee8e07735e34c247c to your computer and use it in GitHub Desktop.
Sync Gulp tasks with run-sequence
var runSequence = require('run-sequence'); // https://www.npmjs.com/package/run-sequence
//Each successive argument waits for the previous task(s) to finish
gulp.task('some-task', function () {
runSequence(
['task-1', 'task-2', 'task-3'], // These 3 can be done in parallel
'task-4', // ...then just do this
['task-5', 'task-5'], // ...then do these things in parallel
'task-6', // ...then do this
// ...
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment