Find unused files and dependencies. Spot these residues, leftovers, relics of an ancient past.
And 🔥 them. Death to legacy & dead code 💀
♻️ Did you recently refactor parts of your awesome project ? ✅
🧓 Is your project so old (more than 2 months old) that you can't even remember why some files & dependencies exist ? ✅
🏭 Is your project so bloated that you're afraid to delete a file ? ✅
Remnants find those relics for you so that you can 🔥 them in peace.
Can be used with webpack, Metro, Rollup (& more) bundled projects but also good old unbundled Node projects.
yarn global add remnants
or
npm i -g remnants
In your project directory
remnants --sourceDirectories src
sourceDirectories
are the folders where you want Remnants to look for unused files.
Running Remnants on itself 🤯
😱 Look at these remnants! 😡
Let 🔥 them all!
...
Done ✅
Yeah no unused files or dependencies 🎉
Thanks Remnants !
remnants --sourceDirectories src --remove
remnants --sourceDirectories src --sourceDirectories lib --projectRoot /Users/remnants/dev/awesome-project --exclude **/*@*x.png
If you're looking for a webpack plugin, give unused-webpack-plugin a try. #shamelessplug