grunt-parallel
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -13,2 +13,10 @@ module.exports = function(grunt) { | ||
}); | ||
grunt.registerTask('fail', function() { | ||
var ms = 500; | ||
var start = +(new Date()); | ||
while (new Date() - start < ms); | ||
grunt.log.error('Failure to be awesome!'); | ||
throw new Error('Broken!'); | ||
}); | ||
@@ -27,2 +35,9 @@ // Project configuration. | ||
args: ['fast'] | ||
}], | ||
fail: [{ | ||
grunt: true, | ||
args: ['fast'] | ||
}, { | ||
grunt: true, | ||
args: ['fail'] | ||
}] | ||
@@ -34,3 +49,5 @@ } | ||
grunt.loadTasks('tasks'); | ||
grunt.registerTask('default', ['parallel']); | ||
}; |
{ | ||
"name": "grunt-parallel", | ||
"description": "Run tasks or commands in child processes.", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"homepage": "https://github.com/iammerrick/grunt-parallel", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -33,3 +33,3 @@ # grunt-parallel | ||
},{ | ||
command: 'some-custom-shell-script.sh' | ||
cmd: 'some-custom-shell-script.sh' | ||
}] | ||
@@ -36,0 +36,0 @@ } |
@@ -17,10 +17,14 @@ /* | ||
if (error || code !== 0) { | ||
grunt.log.error(result.stderr || result.stdout); | ||
var message = result.stderr || result.stdout; | ||
grunt.log.error(message); | ||
if (error.message) { | ||
grunt.log(error.message); | ||
grunt.log.error(error.message); | ||
} | ||
return deferred.reject(); | ||
} | ||
grunt.log.write(result.toString('ascii')); | ||
grunt.log.writeln(result.toString('ascii')); | ||
@@ -34,4 +38,6 @@ deferred.resolve(); | ||
grunt.registerMultiTask('parallel', 'Run sub-tasks in parallel.', function() { | ||
Q.all(this.data.map(spawn)).then(this.async()); | ||
var done = this.async(); | ||
Q.all(this.data.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
4988
74