node-unused-deps
node-unused-deps copied to clipboard
Support usage of dependencies in npm scripts
This might be a bit tricky but it would be great if unused deps wouldn ignore the scripts region in the package.json if it looks i.e. like this:
"scripts": { "watch": "watchify -t babelify -g uglifyify -e src/lib.js -o build/lib.min.js", }
Yes, well, that's too tricky. I think what we can do is to add option unused-deps --ignore foo,bar and recommend to add to your project something like:
"scripts": {
"unused-deps": "unused-deps --ignore foo,bar"
}
Then you can quickly check what's not used with npm run unuded-deps.
unused-deps is tiny and it should stay this way IMHO.
Sounds like a good trade-off. Thanks for that.