Comparing version 0.3.0 to 0.4.0
@@ -14,7 +14,6 @@ var path = require('path'); | ||
var command = function(moduleName, moduleRepo, done){ | ||
console.info('cloning ', moduleName, 'from', moduleRepo); | ||
console.info( ('cloning ' + moduleName + ' from ' + moduleRepo).action ); | ||
var options = nodegitOptions.get(); | ||
clone(moduleRepo, 'modules/' + moduleName, options).then(function(){ | ||
console.info(moduleName, 'has been cloned in folder', modulesDir); | ||
console.info('----------------------'); | ||
console.info( (moduleName + ' has been cloned in folder ' + modulesDir).success ); | ||
done(); | ||
@@ -29,3 +28,3 @@ }, function(err){ | ||
if(err){ | ||
return console.log(err); | ||
return console.log(err.error); | ||
process.exit(1); | ||
@@ -35,4 +34,4 @@ } | ||
repeater(command, function(){ | ||
console.log('cox has successfully run the task install'); | ||
console.log('starting NPM Install'); | ||
console.log('cox has successfully run the task install'.success); | ||
console.log('starting NPM Install'.action); | ||
npmInstall(); | ||
@@ -39,0 +38,0 @@ }); |
var path = require('path'); | ||
var shelljs = require('shelljs/global'); | ||
var repeater = require('../repeater'); | ||
var _ = require('lodash'); | ||
@@ -8,6 +9,14 @@ module.exports = function(){ | ||
var command = function(moduleName, moduleRepo, done){ | ||
console.info('cox is running NPM Install for the', moduleName, 'module'); | ||
console.info(('cox is running NPM Install for the ' + moduleName + ' module').action ); | ||
var pkg = require( path.join(process.cwd(), 'modules', moduleName, 'package.json')); | ||
var deps = _.merge(pkg.dependencies, pkg.devDependencies); | ||
if(Object.keys(deps).length === 0){ | ||
console.info((moduleName + ' has no dependencies').success); | ||
return done(); | ||
} | ||
cd('modules/'+moduleName); | ||
if (exec('npm install').code !== 0) { | ||
console.error('Error: npm install didn\'t run for ' + moduleName); | ||
console.error( ('Error: npm install didn\'t run for ' + moduleName).error); | ||
process.exit(1); | ||
@@ -20,5 +29,5 @@ } | ||
repeater(command, function(){ | ||
console.log('cox has successfully run the task npmInstall'); | ||
console.log('cox has successfully run the task npmInstall'.success); | ||
}); | ||
}; |
var path = require('path'); | ||
var colors = require('colors'); | ||
colors.setTheme(require('./colors-theme')); | ||
var command; | ||
@@ -7,3 +11,3 @@ | ||
} catch(ex){ | ||
console.error('Error: there is no command ' + process.argv[2] + ' in cox'); | ||
console.error(('Error: there is no command ' + process.argv[2] + ' in cox').error); | ||
process.exit(1); | ||
@@ -13,2 +17,4 @@ } | ||
command(process.argv) | ||
command(process.argv); | ||
@@ -8,7 +8,7 @@ var fs = require('fs'); | ||
if(typeof dependencies !== 'object'){ | ||
console.error('Error: no coxDependencies in package.json'); | ||
console.error('Error: no coxDependencies in package.json'.error); | ||
process.exit(1); | ||
} | ||
} catch(ex){ | ||
console.error('Error: not in a project folder - missing package.json'); | ||
console.error('Error: not in a project folder - missing package.json'.error); | ||
process.exit(1); | ||
@@ -15,0 +15,0 @@ } |
{ | ||
"name": "cox", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"preferGlobal": "true", | ||
@@ -27,2 +27,3 @@ "description": "git commander for multi-repositories", | ||
"dependencies": { | ||
"colors": "^1.0.3", | ||
"lodash": "^2.4.1", | ||
@@ -29,0 +30,0 @@ "minimist": "^1.1.0", |
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
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
5107
10
133
6
4
+ Addedcolors@^1.0.3
+ Addedcolors@1.4.0(transitive)