Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

npmi

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npmi

Gives a simplier API to npm install (programatically installs stuffs)

  • 0.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.7K
decreased by-11.86%
Maintainers
1
Weekly downloads
 
Created
Source

npmi

NodeJS package that gives a simplier API to npm install (programatically installs things)

Installation

npm install npmi

Usage

var npmi = require('./../npmi');
var path = require('path');


var options = {
	name: 'your-module',	// your module name
	version: '0.0.1',		// expected version [default: 'latest']
	path: '.',				// installation path [default: '.']
	forceInstall: false,	// force install if set to true (even if already installed, it will do a reinstall) [default: false]
	npmLoad: {				// npm.load(options, callback): this is the "options" given to npm.load()
		loglevel: 'silent'	// [default: {loglevel: 'silent'}]
	}
};
npmi(options, function (err, result) {
	if (err) {
		if 		(err.code === npmi.LOAD_ERR) 	console.log('npm load error');
		else if (err.code === npmi.INSTALL_ERR) console.log('npm install error');
		return console.log(err.message);
	}

	// installed
	console.log(options.name+'@'+options.version+' installed successfully in '+path.resolve(options.path));
});

Keywords

FAQs

Package last updated on 07 Apr 2014

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