Grunt/Gulp
http://slides.com/eatrocks/js-task-runners/live
Bruce Campbell, Just now
Gulp 1,409
Grunt 4,403
src/one.js
src/two.js
app.js
bruce.js
> gulp bruce
...
> grunt bruce
...
> gulp stage
...
By default tasks run concurrently, for serial behavior
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
// if err is not null and not undefined, the orchestration will stop
cb(err);
});
// identifies a dependent task must be complete before this one begins
gulp.task('two', ['one'], function() {
// task 'one' is done now
});
gulp.task('default', ['two']);
// or specify both - 'one' will not run twice
gulp.task('stuff', ['one', 'two']);
Gulp is built on Node Streams = faster
another benefit of streams