Install with :
npm install -g npm-auto-install
Usage command line (in npm project):
nai
missing : koa (index.js)
missing : koa-jwt (index.js)
unused : koa-route
Or with auto install uninstall :
nai -iu
Or with gulp watch :
var gulp = require('gulp');
var AutoInstall = require('npm-auto-install');
gulp.task('nai', function(){
return new AutoInstall().detectMissing(process.cwd(),{install: true, force:true, uninstall: true});
});
gulp.task('watch', function(){
gulp.watch(['./**/*.js', '!./node_modules/**'], ['nai']);
});
Please file an issue on github! Contributors are responsive and happy to assist.
Pull requests are also welcome :)