Skip to content

Instantly share code, notes, and snippets.

@wmakeev
Created February 6, 2015 09:52
Show Gist options
  • Save wmakeev/d6cc596418c9a3cbd8da to your computer and use it in GitHub Desktop.
Save wmakeev/d6cc596418c9a3cbd8da to your computer and use it in GitHub Desktop.
npm API
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