Skip to content

Check whether a npm module is installed, otherwise installed it.

Notifications You must be signed in to change notification settings

CannerCMS/npm-check-install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm-check-install

Check if the specific npm package has already been installed or not. If it has been installed, do nothing; Otherwise, install it.

Installation

$ npm install --save npm-check-install

Usage

const npmCheckInstall = require('npm-check-install');

npmCheckInstall('antd', { cwd: 'path to check and install' // default process.cwd() })
  .then((hasFound) => {
    // do stuff
  })
  .catch((err) => {
    console.error('ERROR: ', err);
  });

License

MIT © Canner

About

Check whether a npm module is installed, otherwise installed it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published