Comparing version 0.0.6 to 0.1.0
# Install | ||
## i | ||
Operates through the `nh i <package/s>` command. | ||
@@ -10,1 +12,13 @@ | ||
- `-s, --silent` Sets the warn-level to `silent` (same as normal `npm i`) | ||
## is | ||
Use with `nh is <package/s>`. | ||
Same as `nh i`, but saves your package/s to the dependencies. | ||
## isd | ||
Use with `nh isd <package/s>`. | ||
Same as `nh i`, but saves your package/s to the dev dependencies. |
@@ -23,1 +23,39 @@ 'use strict'; | ||
}); | ||
program | ||
.command('is <pkg...>') | ||
.description('install and save a package') | ||
.option('-s, --silent', 'do not output anything') | ||
.action(function (pkg, options) { | ||
var npmconf = {}; | ||
npmconf.save = true; | ||
if (options.silent) { | ||
npmconf.loglevel = 'silent'; | ||
} else { | ||
npmconf.loglevel = 'info'; | ||
} | ||
npm.load(npmconf, function (err, npm) { | ||
npm.commands.install(pkg, function (err) { | ||
if (err) throw err; | ||
}); | ||
}); | ||
}); | ||
program | ||
.command('isd <pkg...>') | ||
.description('install and save a package under dev-dependencies') | ||
.option('-s, --silent', 'do not output anything') | ||
.action(function (pkg, options) { | ||
var npmconf = {}; | ||
npmconf['save-dev'] = true; | ||
if (options.silent) { | ||
npmconf.loglevel = 'silent'; | ||
} else { | ||
npmconf.loglevel = 'info'; | ||
} | ||
npm.load(npmconf, function (err, npm) { | ||
npm.commands.install(pkg, function (err) { | ||
if (err) throw err; | ||
}); | ||
}); | ||
}); |
{ | ||
"name": "nh", | ||
"version": "0.0.6", | ||
"version": "0.1.0", | ||
"description": "npm helpers", | ||
@@ -5,0 +5,0 @@ "author": "Jona Hugger <jona@kyr.li> (http://kyr.li)", |
3104
56