sanitycheck

ensure that all deps are present and accounted for CI / CD

sanitycheck

ensure that all deps are present and accounted for CI / CD

add it as a dev dependency to your project

$ npm install --save-dev sanitycheck

and add it as an npm script task by editing your package.json:

{
  "scripts": {
    "sanitycheck": "sanitycheck"
  }
}

Now you can run it using $ npm run sanitycheck and add it to your favorite testing or CI scripts.

If there are any errors, it exits with an error code of 1.

Checking for unused or missing dependencies in package.json...
Validating all require statements...
···
OK
Checking for unused or missing dependencies in package.json...
Dependencies missing in package.json: cool-ascii-faces
Checking for unused or missing dependencies in package.json...
Validating all require statements...
·☹ ·
1 Errors:
Error: Inside "c:\dev\sanitycheck\index.js"
Cannot resolve "./SUB" because:
"c:\dev\sanitycheck\SUB.js" doesn't exactly match the actual file path
"c:\dev\sanitycheck\sub.js"

makes use of excellent work from @thlorenz in valiquire and @justaz in depscan

ISC. (c) MMXIV jden jason@denizac.org. See LICENSE.md