mirek / node-unused-deps

Report unused npm packages in node, es6, babel or coffee project.
MIT License
79 stars 5 forks source link

Support usage of dependencies in npm scripts #4

Open DieTapete opened 9 years ago

DieTapete commented 9 years ago

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

mirek commented 9 years ago

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.

DieTapete commented 9 years ago

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