Add hackish tool for finding unused CSS.

This commit is contained in:
Tim Abbott 2016-03-31 16:29:05 -07:00
parent b8c7cfb77e
commit 7d74c64f75
1 changed files with 8 additions and 0 deletions

8
tools/find-unused-css Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# Hackish tool for attempting to find unused IDs / classes in our CSS
for n in $(perl -lne 'print $1 while /[#.]([a-zA-Z0-9_-]+)/g' static/styles/zulip.css | sort -u); do
if [ $(git grep "$n" | grep -v '^static/styles/zulip.css' | wc -l) -eq 0 ]; then
echo $n
fi
done