grunt-hub
Advanced tools
Comparing version 0.3.1 to 0.3.2
{ | ||
"name": "grunt-hub", | ||
"description": "A Grunt task to watch and run tasks on multiple Grunt projects", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"homepage": "https://github.com/shama/grunt-hub", | ||
@@ -32,6 +32,6 @@ "author": { | ||
"dependencies": { | ||
"gaze": "~0.2.0" | ||
"gaze": "~0.2.0", | ||
"grunt-lib-contrib": "~0.3.1" | ||
}, | ||
"devDependencies": { | ||
"grunt-lib-contrib": "~0.3.0", | ||
"grunt-contrib-jshint": "~0.1.0", | ||
@@ -38,0 +38,0 @@ "grunt-contrib-nodeunit": "~0.1.0", |
@@ -120,2 +120,3 @@ # grunt-hub | ||
* 0.3.2 Fix dep to `grunt-lib-contrib`. Include options in verbose output. Better spawn grunt in hub task. | ||
* 0.3.1 Update to gaze@0.2.0. Only spawn one at a time. Add `interrupt` option. Allow `tasks` to be undefined. Update to run on Grunt v0.4. | ||
@@ -122,0 +123,0 @@ * 0.3.0 Use [gaze](https://github.com/shama/gaze) for watching, Grunt v0.4 compatibility |
@@ -18,6 +18,2 @@ /* | ||
// Find the grunt bin | ||
var gruntBin = path.resolve(process.cwd(), 'node_modules', '.bin', 'grunt'); | ||
if (process.platform === 'win32') { gruntBin += '.cmd'; } | ||
grunt.registerMultiTask('hub', 'Run multiple grunt projects', function() { | ||
@@ -39,5 +35,8 @@ var options = helpers.options(this); | ||
grunt.util.spawn({ | ||
cmd: gruntBin, | ||
// Use the node that spawned this process | ||
cmd: process.argv[0], | ||
// Run from dirname of gruntfile | ||
opts: {cwd: path.dirname(gruntfile)}, | ||
args: grunt.util._.union(tasks, [].slice.call(process.argv, 2)) | ||
// Run grunt this process uses, append the task to be run and any cli options | ||
args: grunt.util._.union([process.argv[1]].concat(tasks), [].slice.call(process.argv, 2)) | ||
}, function(err, res, code) { | ||
@@ -44,0 +43,0 @@ if (code !== 0) { grunt.log.error(res.stderr); } |
@@ -82,3 +82,3 @@ /* | ||
cmd: process.argv[0], | ||
// Run from current working dir | ||
// Run from dirname of gruntfile | ||
opts: {cwd: path.dirname(gruntfile)}, | ||
@@ -153,4 +153,9 @@ // Run grunt this process uses, append the task to be run and any cli options | ||
var patterns = grunt.util._.chain(target.files).flatten().uniq().value(); | ||
// Options for operations on this gruntfile | ||
var options = grunt.util._.defaults(target.options || {}, defaults); | ||
options.cwd = path.dirname(gruntfile); | ||
grunt.verbose.writeflags(options, 'Options'); | ||
// Create watcher | ||
var gaze = new Gaze(patterns, options, function(err) { | ||
@@ -157,0 +162,0 @@ if (err) { |
16220
3
297
134
2
+ Addedgrunt-lib-contrib@~0.3.1
+ Addedgrunt-lib-contrib@0.3.1(transitive)