Run commands and tasks in parallel.
Install this grunt plugin next to your project's Gruntfile.js gruntfile with: npm install grunt-parallel --save-dev
Then add this line to your project's Gruntfile.js
gruntfile:
grunt.loadNpmTasks('grunt-parallel');
- commands - An array of commands to run, each deferred to: http://gruntjs.com/api/grunt.util#grunt.util.spawn
grunt.initConfig({
parallel: {
assets: [{
grunt: true,
args: ['requirejs']
}, {
grunt: true,
args: ['compass']
},{
cmd: 'some-custom-shell-script.sh'
}]
}
});
One might target the task using grunt parallel:assets
. This would run compass, requirejs, and a custom shell script at the same time, each logging to your console when they are done.
Copyright (c) 2013 Merrick Christensen Licensed under the MIT license.