Comparing version 0.1.1 to 0.1.2
@@ -5,3 +5,26 @@ 'use strict'; | ||
var npm = require('npm'); | ||
var chalk = require('chalk'); | ||
/* stuff i'm working on | ||
// install all packages | ||
program | ||
.command('i') | ||
.description('install all packages specified') | ||
.option('-s, --silent', 'do not output anything') | ||
.action(function (options) { | ||
var npmconf = {}; | ||
if (options.silent) { | ||
npmconf.loglevel = 'silent'; | ||
} else { | ||
npmconf.loglevel = 'http'; | ||
} | ||
npm.load(npmconf, function (err, npm) { | ||
if (err) throw err; | ||
var tmpPkg = require(process.cwd() + '/package.json'); | ||
for (var p in tmpPkg['dependencies']) { | ||
console.log(p); | ||
} | ||
}); | ||
}); */ | ||
// install a package | ||
program | ||
@@ -19,2 +42,3 @@ .command('i <pkg...>') | ||
npm.load(npmconf, function (err, npm) { | ||
console.log(chalk.bgWhite(chalk.black('nh')) + ' about to install %s', pkg.join(' ')); | ||
npm.commands.install(pkg, function (err) { | ||
@@ -26,2 +50,3 @@ if (err) throw err; | ||
// install and save a package | ||
program | ||
@@ -40,2 +65,3 @@ .command('is <pkg...>') | ||
npm.load(npmconf, function (err, npm) { | ||
console.log(chalk.bgWhite(chalk.black('nh')) + ' about to install and save %s', pkg.join(' ')); | ||
npm.commands.install(pkg, function (err) { | ||
@@ -47,2 +73,3 @@ if (err) throw err; | ||
// install and save a package to dev dependencies | ||
program | ||
@@ -61,2 +88,3 @@ .command('isd <pkg...>') | ||
npm.load(npmconf, function (err, npm) { | ||
console.log(chalk.bgWhite(chalk.black('nh')) + ' about to install and save %s to dev dependencies', pkg.join(' ')); | ||
npm.commands.install(pkg, function (err) { | ||
@@ -63,0 +91,0 @@ if (err) throw err; |
{ | ||
"name": "nh", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "npm helpers", | ||
@@ -25,2 +25,3 @@ "author": "Jona Hugger <jona@kyr.li> (http://kyr.li)", | ||
"dependencies": { | ||
"chalk": "^0.5.1", | ||
"commander": "^2.5.0", | ||
@@ -27,0 +28,0 @@ "npm": "^2.1.10" |
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
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
4140
84
3
+ Addedchalk@^0.5.1
+ Addedansi-regex@0.2.1(transitive)
+ Addedansi-styles@1.1.0(transitive)
+ Addedchalk@0.5.1(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-ansi@0.1.0(transitive)
+ Addedstrip-ansi@0.3.0(transitive)
+ Addedsupports-color@0.2.0(transitive)