1.0.25 • Published 8 years ago
promisify-npm v1.0.25
promisify-npm
The library is mainly used to operate npm daily routines in your application. perfect for making efficient tools.
Usage
var npm = require('promisify-npm');
npm
.getPkgInfo('react')
.then(function(d) {
console.log(d.name,
d.version,
d.description);
})
.catch(function(e) {
console.log(e);
})
npm
.install('promisify-git')
.then(function(pkg_infos) {
console.log(pkg_infos);
})
.catch(function(e) {
console.log(e);
})
npm
.uninstall(['promisify-git','react'],'/something/folder/xx')
.then(function(d) {
console.log(d);
})
.catch(function(e) {
console.log(e);
})
API
The param pkgs
could be a string
or array
which is supporting batch operations.
The param where
is designed for specific purpose if you'd like to install packages as you want. default is process.cwd
- install(pkgs ,where)
- uninstall(pkgs ,where)
- hasInstalled(pkgs,,where)
- initDefaultPkg(where,packageJson)
coutinuing...
This library is under developing, All API might be changed for some reasons. So, be cautious using it.
Good Library Companions
1.0.25
8 years ago
1.0.24
8 years ago
1.0.23
8 years ago
1.0.22
8 years ago
1.0.21
8 years ago
1.0.20
8 years ago
1.0.19
8 years ago
1.0.16
8 years ago
1.0.15
8 years ago
1.0.14
8 years ago
1.0.13
8 years ago
1.0.12
8 years ago
1.0.11
8 years ago
1.0.10
8 years ago
1.0.9
8 years ago
1.0.8
8 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago