A few months ago I started working on one web site. That was basically my playground. I was able to test different JavaScript libraries there, to play with CSS styles and HTML templates that I stole from other web sites, etc.
Once I was finally satisfied how my site looks like, I realized that I have a whole lot of junk in my resource folder! Hundreds of javascript functions, css styles and images. I had no idea what was used and where.
So, I said to myself: “Boy, clean up your room!”
Well, easier said then done! After googling the Universe I realized that there are no programs that could help me with this. But I just wanted a simple stuff: tell me which images are not used, which JS functions are unused or duplicated, and the same for CSS styles!
The market was empty. For the first time in my development career there was absolutely nothing that could do this task. To be honest, there are some Firefox plugins that can help you with CSS styles, IntelliJ IDEA also has something, Dreamweaver too, but I wanted all of it in one place.
So, I said to myself again: “Boy, before you start cleaning your room, you need to get yourself a nice tool to help you out.”
And that is how WARI was born. WARI – Web Application Resource Inspector.
What it does is quite simple: goes through your directory structure and searches for JavaScript, CSS, HTML and image files. Then it processes all of them in order to find dependencies – where is what used. As a result, you get a report about unused and duplicated stuff in your web application. Works fine for me.