Kami / node-unused

A module which reports defined, but unused variables in your code.
Apache License 2.0
57 stars 5 forks source link

Specify a path or a file #4

Open gmarty opened 11 years ago

gmarty commented 11 years ago

Hi,

That would be great if we could specify a path and having the binary to detect unused var in all *.js files on this directory, recursively.

We can use node-glob to fetch files recursively given a path.

defunctzombie commented 11 years ago

I do this with the "find" utility and have that exec the binary with each filename I am interested in. Could be something that we can add to the binary tho. Will keep the issue open and think about it :)

SystemParadox commented 9 years ago

This would be especially nice if it would exclude node_modules automatically.

It's a bit clumsy doing this all the time:

find -name '*.js' -not -path './node_modules/*' | xargs unused

Thanks.

tannerkc commented 8 months ago

@gmarty https://www.npmjs.com/package/reveal-unused?activeTab=readme