New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

npminstall

Package Overview
Dependencies
Maintainers
2
Versions
268
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npminstall

Let npm install fast and easy

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
decreased by-14.53%
Maintainers
2
Weekly downloads
 
Created
Source

npminstall

NPM version build status appveyor build status Test coverage David deps npm download

Let npm install fast and easy.

Installation

$ npm install npminstall --save

Quick start

const co = require('co');
const npminstall = require('npminstall');

co(function*() {
  yield npminstall({
    // install root dir
    root: process.cwd(),
    // optional packages need to install, default is package.json's dependencies and devDependencies
    // pkgs: [
    //   { name: 'foo', version: '~1.0.0' },
    // ],
    // registry, default is https://registry.npmjs.org
    // registry: 'https://registry.npmjs.org',
    // debug: false,
    // storeDir: root + '.npminstall',
  });
}).catch(function(err) {
  console.error(err.stack);
});

node_modules

Two rules:

  • The latest version of modules will link at options.storeDir's node_modules.
  • Module's dependencies will link at module's node_modules.

e.g.:

  • app: { "dependencies": { "a": "1.0.0" } } (root)
  • a@1.0.0: { "dependencies": { "c": "2.0.0", "b": "1.0.0" } }
  • b@1.0.0: { "dependencies": { "c": "1.0.0" } }
app/package.json
app/node_modules/.npminstall/a/1.0.0
app/node_modules/.npminstall/a/1.0.0/node_modules/c@ -> ../../../c/2.0.0
app/node_modules/.npminstall/a/1.0.0/node_modules/b@ -> ../../../b/1.0.0
app/node_modules/.npminstall/b/1.0.0
app/node_modules/.npminstall/b/1.0.0/node_modules/c@ -> ../../../c/1.0.0
app/node_modules/.npminstall/c/1.0.0
app/node_modules/.npminstall/c/2.0.0
app/node_modules/a@ -> .npminstall/a/1.0.0
app/node_modules/.npminstall/node_modules/b@ -> ../b/1.0.0 (latest version)
app/node_modules/.npminstall/node_modules/c@ -> ../c/2.0.0 (latest version)

a@1.0.0 is root package, won't create link at app/node_modules/.npminstall/node_modules/a@.

License

MIT

Keywords

FAQs

Package last updated on 14 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc