Closed nebrelbug closed 6 years ago
I was someone mention one on Twitter
npm install -g node-prune
If you are using yarn go for yarn autoclean
just wrote one in ts https://github.com/xg-wang/pruner-cli
Oh, okay. Cool!
Having just found this thread whilst looking to install this via NPM, as expected on NPM there are a fair few options but this package doesn't appear to be one of them.
I thought I'd have a quick look to see which one pruned most aggressively with the default settings. Results below in case they're any use to anyone.
git reset --hard HEAD; git clean -fd; rm -rf node_modules/; yarn;
du -sh
find . -type f | wc -l
control (unpruned) 23862 298M
autoclean 20514 274M https://yarnpkg.com/en/docs/cli/autoclean
node-prune (bash) 18274 264M https://github.com/tuananh/node-prune
modlcean (caution) 17053 250M https://github.com/ModClean/modclean
nm-prune 18305 247M https://github.com/pingyhq/nm-prune
pruner-cli 17017 241M https://github.com/xg-wang/pruner-cli
node-prune (this lib) 17007 241M https://github.com/tj/node-prune/
modclean (danger) 14496 212M https://github.com/ModClean/modclean
Edit: I have also since found cruft but it doesn't seem to run 🤷♂️
If not, I'd be interested in creating one...