NPM.installDependencies()

Install NPM dependencies of local package at the specified path.

Usage

Hover over inputs/exits for more info.

var NPM = require('machinepack-npm');


// Install NPM dependencies of local package at the specified path.

NPM.installDependencies({

dir: '/Users/mikermcneil/dogfood-promo-site',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// No directory exists at the provided path.

noSuchDir: function () {

 

},

// The provided path does not point to a directory (i.e. it might be a file or shortcut)

notADir: function () {

 

},

// The package does not contain a package.json file, or it cannot be parsed.

invalidPackage: function () {

 

},

// OK.

success: function () {

 

},

});

Inputs

dir required

The path to the directory where the package is located on disk.

'/Users/mikermcneil/dogfood-promo-site'

Exits

error

An unexpected error occurred.

noSuchDir

No directory exists at the provided path.

notADir

The provided path does not point to a directory (i.e. it might be a file or shortcut)

invalidPackage

The package does not contain a package.json file, or it cannot be parsed.

success

OK.