npm-utils

Async NPM shell commands

npm-utils

Async NPM shell commands: install, test, etc.

path() // returns immediately path to npm command 
install({
    name: string,
    version: string (optional),
    prefix: string (optional), // folder path prefix 
    passThroughData: obj (optional)
})
 
returns a promise
version() // returns a promise, resolved with version string 
test() // spawns npm test command 
registryUrl(); // returns a promise 
// same as `npm config get registry` 

Author: Gleb Bahmutov @ 2013 @bahmutov

License: MIT - do anything with the code, but don't blame me if it does not work.