https://github.com/cannercms/npm-check-install
Check whether a npm module is installed, otherwise installed it.
https://github.com/cannercms/npm-check-install
Last synced: 12 months ago
JSON representation
Check whether a npm module is installed, otherwise installed it.
- Host: GitHub
- URL: https://github.com/cannercms/npm-check-install
- Owner: CannerCMS
- Created: 2018-10-05T02:14:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-20T03:44:50.000Z (over 7 years ago)
- Last Synced: 2025-03-03T11:35:49.343Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 185 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```sh
$ npm install --save npm-check-install
```
## Usage
```js
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](http://github.com/canner)