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