1.0.0 • Published 5 years ago

scan-unused-packages v1.0.0

Weekly downloads
1
License
Apache-2.0
Repository
-
Last release
5 years ago

Scan project for packages used in package.json that are not used.

How it works

  • Open package.json and get dependencies + devDependencies.
  • Run grep search for each package
  • Output the package, number of uses in files and ouput of matches.

The node app uses grep-search.sh that basicaly runs this

grep -HniR --exclude=\*.map --exclude=vendors.js --exclude-dir={node_modules,__html/build} "from\ [\"\|']PACKAGE_NAME\|require([\"\|']PACKAGE_NAME" DIRECTORY

Usage

npm run-script run DIRECTORY 

or

node ./cli.js DIRECTORY