npm-install-package
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -8,3 +8,3 @@ const exec = require('child_process').exec | ||
// Install an npm package | ||
// ([str], obj, obj, fn) -> null | ||
// ([str]|str, obj, obj, fn) -> null | ||
function npmInstallPackage (deps, opts, cb) { | ||
@@ -15,3 +15,3 @@ if (!cb) { | ||
} | ||
Array.isArray(deps) ? deps : [ deps ] | ||
deps = Array.isArray(deps) ? deps : [ deps ] | ||
opts = opts || opts | ||
@@ -18,0 +18,0 @@ cb = cb || noop |
{ | ||
"name": "npm-install-package", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Install an npm package", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,2 +19,11 @@ # npm-install-package | ||
npmInstallPackage('cliclopts', opts, err => { | ||
if (err) throw err | ||
}) | ||
``` | ||
With multiple installs, offline-first fetching and saving to dev dependencies: | ||
```js | ||
const npmInstallPackage = require('npm-install-package') | ||
const devDeps = [ 'map-limit', 'minimist', 'cliclopts' ] | ||
@@ -21,0 +30,0 @@ const opts = { saveDev: true, cache: true } |
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
5073
56