Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check whether a package is used as a binary in npm run scripts. #9

Open
jonschlinkert opened this issue Mar 10, 2015 · 4 comments
Open
Labels

Comments

@jonschlinkert
Copy link
Collaborator

per #8

@es128
Copy link

es128 commented Aug 22, 2015

Following up here from micromatch/micromatch@8fc862d#commitcomment-12843297

Why not just take the unused deps that are detected and check for whether their name is part of a value in package.json scripts, then suppress warnings for any matches? Far from foolproof, but it would be a decent start, wouldn't it?

@es128
Copy link

es128 commented Aug 22, 2015

To your point about global deps, imo if it's being used in npm scripts it should be a dev dep rather than relying upon a global installation.

@jonschlinkert
Copy link
Collaborator Author

take the unused deps that are detected and check for whether their name is part of a value in package.json scripts

that's what I was thinking too... although it might be brittle. I'll try to put something together after this coming wed.

@es128
Copy link

es128 commented Aug 22, 2015

Maybe a bit brittle, but an improvement at least.

I guess a more robust version would actually check the target package's binary value to account for cases like grunt-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants