Skip to content

gerchardon/npm-auto-install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version Dependency Status devDependency Status Build Status Coverage Status

Usage

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']);
});

Contrib

Please file an issue on github! Contributors are responsive and happy to assist.

Pull requests are also welcome :)

About

Npm detect require to install in package.json

Resources

License

Stars

Watchers

Forks

Packages

No packages published