npm-install-modules

0.1.3 • Public • Published

npm-install-modules

NPM version Downloads experimental ISC license

Install npm modules (dependencies and devDependencies) programmatically.

Still quite raw as an individual module. Needs more testing in the wild (production use) to flesh out use-case development. Comments/PR's welcomed.

Installation

$ npm install npm-install-modules

Usage

var installModules = require('npm-install-modules')
 
var opts {
  dependencies: ["mout", "clockin", "colorz"],
  devDependencies: ["tape", "mocha"]
}
 
installModules(opts, function () {
  // do something here
})

results in package.json...

 "dependencies"{
    "clockin": "^0.1.1",
    "colorz": "^0.1.4",
    "mout": "^0.11.0"
  },
  "devDependencies"{
    "mocha": "^2.2.5",
    "tape": "^4.0.1"
  },

Why?

Building a scaffolder. Extracted this module from npinit. Figured it would be useful as a stand-alone.

See Also

License

ISC

Package Sidebar

Install

npm i npm-install-modules

Weekly Downloads

2

Version

0.1.3

License

ISC

Last publish

Collaborators

  • akileez