https://github.com/practo/npm-dependency-checker
Checks npm dependencies that are unused or un-installed.
https://github.com/practo/npm-dependency-checker
Last synced: 5 months ago
JSON representation
Checks npm dependencies that are unused or un-installed.
- Host: GitHub
- URL: https://github.com/practo/npm-dependency-checker
- Owner: practo
- Created: 2018-02-08T07:34:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T18:37:19.000Z (over 3 years ago)
- Last Synced: 2025-09-07T17:29:41.720Z (9 months ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 2
- Watchers: 9
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NPM Dependency Checker
A package that does analysis on dependecies to figure out,
- **Unused Dependencies**: Declared in the package.json file, but not used in any file.
- **Unused Dev Dependencies**: Declared in the package.json file, but not used in any file.
- **Missing Dependencies**: Used somewhere in the code, but not declared in package.json file.
### Install:
```
npm i --g npm-dependency-checker
```
### Usage
Run this command
```
ndc
```
The `application_root_path` is a mandatory argument. It should be the same path where `package.json` is. ndc supports relative paths as well, e.g., `ndc .` to run ndc in current folder.
### Configuration
This package is based on another pacakge [depcheck](https://www.npmjs.com/package/depcheck), and supports all configuration that depcheck supports. The json configuration needs to be present in a file named `.ndcrc` in the application root.
```
my-awesome-application
|-- ...
|-- .ndcrc
|-- package.json
```
### Integration with Travis
Modify the `travis.yml` file accordingly,
```
travis.yml
before_install:
- ...
- npm install --progress=false -g npm-dependency-checker
install:
- ...
- ndc .
```