grunt-parallel
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -35,3 +35,2 @@ module.exports = function(grunt) { | ||
},{ | ||
grunt: true, | ||
args: ['fast'] | ||
@@ -38,0 +37,0 @@ }] |
{ | ||
"name": "grunt-parallel", | ||
"description": "Run tasks or commands in child processes.", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/iammerrick/grunt-parallel", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -111,3 +111,5 @@ # grunt-parallel | ||
assets: { | ||
grunt: true, | ||
options: { | ||
grunt: true | ||
}, | ||
tasks: ['fast', 'block', 'fast'] | ||
@@ -114,0 +116,0 @@ } |
@@ -17,2 +17,5 @@ /* | ||
grunt.util.spawn(task, function(error, result, code) { | ||
grunt.log.writeln(); | ||
lpad.stdout(' '); | ||
if (error || code !== 0) { | ||
@@ -22,2 +25,3 @@ var message = result.stderr || result.stdout; | ||
grunt.log.error(message); | ||
lpad.stdout(); | ||
@@ -27,3 +31,4 @@ return deferred.reject(); | ||
grunt.log.writeln('\n' + result); | ||
grunt.log.writeln(result); | ||
lpad.stdout(); | ||
@@ -37,3 +42,2 @@ deferred.resolve(); | ||
grunt.registerMultiTask('parallel', 'Run sub-tasks in parallel.', function() { | ||
lpad.stdout(' '); | ||
var done = this.async(); | ||
@@ -49,3 +53,3 @@ var options = this.options({ | ||
return { | ||
args: task, | ||
args: [task], | ||
grunt: true | ||
@@ -55,3 +59,23 @@ } | ||
} | ||
// Default to grunt it a task isn't specified | ||
this.data.tasks = this.data.tasks.map(function(task) { | ||
if ( ! task.cmd ) { | ||
task.grunt = true; | ||
} | ||
return task; | ||
}); | ||
// Pass verbose flag to spawned tasks | ||
if (grunt.option('verbose')) { | ||
this.data.tasks.forEach(function(task) { | ||
if (task.grunt) { | ||
task.args.push('--verbose'); | ||
} | ||
}); | ||
} | ||
if (options.stream === true) { | ||
@@ -65,6 +89,5 @@ this.data.tasks = this.data.tasks.map(function(task) { | ||
Q.all(this.data.tasks.map(spawn)).then(done, done.bind(this, false)).finally(function() { | ||
lpad.stdout(); | ||
}); | ||
Q.all(this.data.tasks.map(spawn)).then(done, done.bind(this, false)); | ||
}); | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8209
124
125