npm-install-package
Install an npm package
Last updated 9 years ago by yoshuawuyts .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install npm-install-package 
SYNC missed versions from official npm registry.

npm-install-package

NPM version build status Test coverage Downloads js-standard-style

Install an npm package.

Installation

$ npm install npm-install-package

Usage

var install = require('npm-install-package')

install('minimist', function (err) {
  if (err) throw err
})

With multiple installs, offline-first fetching and saving to dev dependencies:

var install = require('npm-install-package')

var devDeps = [ 'map-limit', 'minimist', 'cliclopts' ]
var opts = { saveDev: true, cache: true }

install(devDeps, opts, function (err) {
  if (err) throw err
})

API

install(dependencies, options, cb)

Install an array of dependencies. Opts can contain the following values:

  • save: save a value to dependencies. Defaults to false
  • saveDev: save a value to devDependencies. Defaults to false
  • cache: attempt to get packages from the local cache first. Defaults to false
  • silent: install packages silently without writing to stdout. Defaults to false

License

MIT

Current Tags

  • 2.1.0                                ...           latest (8 years ago)

6 Versions

  • 2.1.0                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.1.0                                ...           8 years ago
  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (16)
Dependents (3)

Copyright 2013 - present © cnpmjs.org | Home |