4 easy scripts to clean up your CSS tech debt

When I worked at Intuit I spent a lot of time with legacy code and large front end plugins that contained our microservices. Design changes were challenging, as the usage of our central style repository was not enforced and our design system had multiple versions that were more or less up to date.

Every time I start working on a new code base, I do an initial “spring cleaning” and remove obvious legacy code elements to reduce the amount of tech debt. This initial effort enables me to move fast for my upcoming work, as I am already familiar with the repository and the cleaned up code makes it easier to implement changes.

As for our Sass files I soon realized that there were repetitive tasks that I had to do over and over again. I realized pretty quickly that these tasks could be automated. Thus the four shell scripts were born. They scan your CSS or Sass file and remove unused elements.

You can read about the journey on Medium!

Or you can go directly to the git repository and fork the scripts.

Happy spring cleaning!

Share on facebook
Share on twitter
Share on linkedin