Created
February 6, 2015 09:52
-
-
Save wmakeev/d6cc596418c9a3cbd8da to your computer and use it in GitHub Desktop.
npm API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var npm = require('npm'); | |
var pkg = require('../package'); | |
npm.load(pkg, function (err) { | |
if (err) throw err; | |
npm.commands.install(['have'], function (err) { | |
if (err) throw err; | |
console.log('Packages installed'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment