node-unused-deps icon indicating copy to clipboard operation
node-unused-deps copied to clipboard

Support usage of dependencies in npm scripts

Open DieTapete opened this issue 10 years ago • 2 comments

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", }

DieTapete avatar Mar 11 '15 23:03 DieTapete

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.

mirek avatar Jul 18 '15 16:07 mirek

Sounds like a good trade-off. Thanks for that.

DieTapete avatar Jul 18 '15 21:07 DieTapete