Hi all,
I’ve been learning some c#
to build some cross platform CLI’s and Apps, and after reading this post a couple of days ago about removing unused modules in a project it seemed like a good problem to try and solve.
I’ve been wanting to give something back to this great community for some time, so this is the start of what I hope will end up being a feature rich CLI to help with developing Elm projects.
At the moment it enables you to search a project and either:
- Show all the unused modules.
- Rename all the unused modules by adding a tilde (~) to the front of the filename. Allowing you to run the compiler and check all is still ok, before removing them.
- Interactively delete the unused modules one at a time, choosing whether to delete each file or not.
- Delete all unused modules in a single operation.
Of course, the safest way to use this would be to check all your files into version control, run the tool, and if it deletes a file it shouldn’t - which I haven’t encountered - you can then simply checkout
your files to recover them.
I want to add lots more features, but decided to put this out there now to see what you all think.
The repo is here where you can find more info, and releases for OSX and various Linux distros. I don’t have a Windows machine at the moment, so haven’t been able to compile for Windows, but you can compile from source if you are working on a Windows machine.
I hope this is useful, and look forward to adding more features over the coming weeks, months and hopefully years if people like the idea.
Thanks to everyone in this community for all the help I’ve received over the years, hopefully as this CLI matures it will help others.
Paul