Created
March 6, 2014 21:29
-
-
Save tbranyen/9400087 to your computer and use it in GitHub Desktop.
Grunt: Register Parallel Tasks
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 grunt = require("grunt"); | |
grunt.registerParallelTasks = function(name, tasks) { | |
function runParallelTasks(tasks) { | |
tasks.forEach(function(name) { | |
var task = grunt.util.spawn({ args: [name], grunt: true }); | |
task.stdout.pipe(process.stdout); | |
task.stderr.pipe(process.stderr); | |
}); | |
} | |
grunt.registerTask(name, function() { | |
this.async(); | |
runParallelTasks(tasks); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment