grunt-hub
Advanced tools
Comparing version 0.6.2 to 0.7.0
{ | ||
"name": "grunt-hub", | ||
"description": "A Grunt task to watch and run tasks on multiple Grunt projects", | ||
"version": "0.6.2", | ||
"version": "0.7.0", | ||
"homepage": "https://github.com/shama/grunt-hub", | ||
@@ -32,3 +32,3 @@ "author": { | ||
"chalk": "~0.4.0", | ||
"async": "~0.2.10", | ||
"async": "~0.9.0", | ||
"lodash": "~2.4.1" | ||
@@ -35,0 +35,0 @@ }, |
@@ -141,2 +141,3 @@ # grunt-hub | ||
* 0.7.0 Update async to ~0.9.0, warn when files not found and finish task when idle. Thanks @dylancwood! | ||
* 0.6.2 Fix syntax error. Thanks @eugeneiiim! | ||
@@ -143,0 +144,0 @@ * 0.6.1 Fix path.resolve must be strings for ownGruntfile. Thanks @terribleplan! |
@@ -45,3 +45,15 @@ /* | ||
var queue = async.queue(function(run, next) { | ||
var skipNext = false; | ||
grunt.log.ok('Running [' + run.tasks + '] on ' + run.gruntfile); | ||
if (cliArgs) { | ||
cliArgs = cliArgs.filter(function(currentValue) { | ||
if (skipNext) return (skipNext = false); | ||
var out = /^--gruntfile(=?)/.exec(currentValue); | ||
if (out) { | ||
if (out[1] !== '=') skipNext = true; | ||
return false; | ||
} | ||
return true; | ||
}); | ||
} | ||
var child = grunt.util.spawn({ | ||
@@ -73,2 +85,6 @@ // Use grunt to run the tasks | ||
var gruntfiles = grunt.file.expand({filter: 'isFile'}, files.src); | ||
// Display a warning if no files were matched | ||
if (!gruntfiles.length) { | ||
grunt.log.warn('No Gruntfiles matched the file patterns: "' + files.orig.src.join(', ') + '"'); | ||
} | ||
gruntfiles.forEach(function(gruntfile) { | ||
@@ -87,4 +103,11 @@ gruntfile = path.resolve(process.cwd(), gruntfile); | ||
//After processing all files and queueing them, make sure that at least one file is queued | ||
if (queue.idle()) { | ||
// If the queue is idle, assume nothing was queued and call done() immediately after sending warning | ||
grunt.warn('No Gruntfiles matched any of the provided file patterns'); | ||
done(); | ||
} | ||
}); | ||
}; |
12254
147
166
+ Addedasync@0.9.2(transitive)
- Removedasync@0.2.10(transitive)
Updatedasync@~0.9.0