Comparing version 0.4.4 to 0.4.5
@@ -0,0 +0,0 @@ module.exports = { |
@@ -0,0 +0,0 @@ var repeater = require('../repeater'); |
module.exports = function(args){ | ||
console.info( 'Usage: "cox <<command>>"'.success ); | ||
}; |
@@ -17,2 +17,5 @@ var fs = require('fs'); | ||
var command = function(moduleName, moduleRepo, done){ | ||
if(!moduleName){ | ||
return done(); | ||
} | ||
console.info( ('cloning ' + moduleName + ' from ' + moduleRepo).action ); | ||
@@ -19,0 +22,0 @@ if(installedModules.indexOf(moduleName) > -1){ |
@@ -9,5 +9,6 @@ var path = require('path'); | ||
var command = function(moduleName, moduleRepo, done){ | ||
console.info(('cox is running npm ' + subCommand + ' for the ' + moduleName + ' module').action ); | ||
var pkg = require( path.join(process.cwd(), 'modules', moduleName, 'package.json')); | ||
var deps = _.merge(pkg.dependencies, pkg.devDependencies); | ||
console.info(('cox is running npm ' + subCommand + ' for the ' + (moduleName || 'main') + ' module').action ); | ||
var moduleLocation = !!moduleName? path.join('modules/', moduleName) : '.'; | ||
var pkg = require( path.join( process.cwd(), moduleLocation, 'package.json' ) ); | ||
var deps = _.merge(pkg.dependencies || {}, pkg.devDependencies || {}); | ||
if(Object.keys(deps).length === 0){ | ||
@@ -18,3 +19,3 @@ console.info((moduleName + ' has no dependencies').warning); | ||
cd('modules/'+moduleName); | ||
!!moduleName && cd('modules/'+moduleName); | ||
@@ -25,4 +26,4 @@ if (exec('npm ' + subCommand).code !== 0) { | ||
} | ||
console.info( ('successfully ran npm ' + subCommand + ' on module ' + moduleName).success); | ||
cd('../..'); | ||
console.info( ('successfully ran npm ' + subCommand + ' on module ' + (moduleName || 'main')).success); | ||
!!moduleName && cd('../..'); | ||
done(); | ||
@@ -33,10 +34,4 @@ }; | ||
repeater(command, function(){ | ||
//run for the command in the main project folder | ||
console.info( ('running npm ' + subCommand + ' in ' + process.cwd() ).action); | ||
if (exec('npm ' + subCommand).code !== 0) { | ||
console.error( ('Error: npm install didn\'t run for ' + moduleName).error); | ||
process.exit(1); | ||
} | ||
console.log( ('cox has successfully run the task npm ' + subCommand).success); | ||
}); | ||
}; |
@@ -0,0 +0,0 @@ var shelljs = require('shelljs/global'); |
@@ -20,3 +20,5 @@ var fs = require('fs'); | ||
(function traverse(){ | ||
command(null, null, traverse); | ||
function traverse(){ | ||
var moduleName = modules.shift(); | ||
@@ -28,5 +30,5 @@ if(!moduleName){ | ||
command(moduleName, moduleRepo, traverse); | ||
})(); | ||
}; | ||
}; | ||
{ | ||
"name": "cox", | ||
"version": "0.4.4", | ||
"version": "0.4.5", | ||
"preferGlobal": "true", | ||
@@ -5,0 +5,0 @@ "description": "git commander for multi-repositories", |
@@ -0,0 +0,0 @@ # cox |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
0
5624
116