Socket
Socket
Sign inDemoInstall

grunt-hub

Package Overview
Dependencies
7
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.6 to 0.4.0

10

package.json
{
"name": "grunt-hub",
"description": "A Grunt task to watch and run tasks on multiple Grunt projects",
"version": "0.3.6",
"version": "0.4.0",
"homepage": "https://github.com/shama/grunt-hub",

@@ -25,3 +25,2 @@ "author": {

"main": "Gruntfile.js",
"bin": "bin/grunt-hub",
"engines": {

@@ -34,8 +33,7 @@ "node": ">= 0.8.0"

"dependencies": {
"gaze": "~0.3.2",
"grunt-lib-contrib": "~0.3.1"
"gaze": "~0.3.3"
},
"devDependencies": {
"grunt-contrib-jshint": "~0.1.1rc6",
"grunt": "~0.4.0rc7"
"grunt-contrib-jshint": "~0.1.1",
"grunt": "~0.4.0"
},

@@ -42,0 +40,0 @@ "keywords": [

@@ -120,2 +120,3 @@ # grunt-hub

* 0.4.0 Support for Grunt v0.4.
* 0.3.6 Propagate exit codes. Thanks @wachunga!

@@ -138,3 +139,3 @@ * 0.3.5 Update for latest grunt. Thanks @akinofftz!

[grunt]: https://github.com/cowboy/grunt
[getting_started]: https://github.com/cowboy/grunt/blob/master/docs/getting_started.md
[grunt]: https://github.com/gruntjs/grunt
[getting_started]: http://gruntjs.com/getting-started

17

tasks/hub.js

@@ -5,3 +5,3 @@ /*

*
* Copyright (c) 2012 Kyle Robinson Young
* Copyright (c) 2013 Kyle Robinson Young
* Licensed under the MIT license.

@@ -13,15 +13,8 @@ */

// TODO: ditch this when grunt v0.4 is released
grunt.util = grunt.util || grunt.utils;
var helpers = require('grunt-lib-contrib').init(grunt);
var path = require('path');
grunt.registerMultiTask('hub', 'Run multiple grunt projects', function() {
var options = helpers.options(this);
var options = this.options();
grunt.verbose.writeflags(options, 'Options');
// TODO: ditch this when grunt v0.4 is released
this.files = this.files || helpers.normalizeMultiTaskFiles(this.data, this.target);
var done = this.async();

@@ -64,8 +57,8 @@ var errorCount = 0;

}, function () {
var withoutErrors = (errorCount === 0);
done(withoutErrors);
var withoutErrors = (errorCount === 0);
done(withoutErrors);
});
});
};

@@ -5,3 +5,3 @@ /*

*
* Copyright (c) 2012 Kyle Robinson Young
* Copyright (c) 2013 Kyle Robinson Young
* Licensed under the MIT license.

@@ -12,26 +12,23 @@ */

exports.init = function(grunt) {
var exports = {};
var grunt = require('grunt');
// Find watch tasks and files in a config
exports.getTargets = function(watch, target, name) {
var targets = target ? [target] : Object.keys(watch).filter(function(key) {
return typeof watch[key] !== 'string' && !Array.isArray(watch[key]);
});
targets = targets.map(function(target) {
// Fail if any required config properties have been omitted
target = [(name || 'watch'), target];
this.requiresConfig && this.requiresConfig(target.concat('files'));
return grunt.config(target);
}, this);
var hub = module.exports = {};
// Allow "basic" non-target format
if (typeof watch.files === 'string' || Array.isArray(watch.files)) {
targets.push({files: watch.files, tasks: watch.tasks});
}
return targets;
};
// Find watch tasks and files in a config
hub.getTargets = function(watch, target, name) {
var targets = target ? [target] : Object.keys(watch).filter(function(key) {
return typeof watch[key] !== 'string' && !Array.isArray(watch[key]);
});
targets = targets.map(function(target) {
// Fail if any required config properties have been omitted
target = [(name || 'watch'), target];
this.requiresConfig && this.requiresConfig(target.concat('files'));
return grunt.config(target);
}, this);
return exports;
// Allow "basic" non-target format
if (typeof watch.files === 'string' || Array.isArray(watch.files)) {
targets.push({files: watch.files, tasks: watch.tasks});
}
return targets;
};

@@ -5,3 +5,3 @@ /*

*
* Copyright (c) 2012 Kyle Robinson Young
* Copyright (c) 2013 Kyle Robinson Young
* Licensed under the MIT license.

@@ -13,8 +13,5 @@ */

// TODO: ditch this when grunt v0.4 is released
grunt.util = grunt.util || grunt.utils;
var async = grunt.util.async;
var _ = grunt.util._;
var hub = require('./lib/hub').init(grunt);
var hub = require('./lib/hub');
var path = require('path');

@@ -21,0 +18,0 @@ var Gaze = require('gaze').Gaze;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc