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