Commit Graph

4 Commits

Author SHA1 Message Date
Steve Howell 2488438d90 tools: Convert fix-unused-css to look at zulip.scss.
This tool is hackish and incomplete, but it's still
worth looking at if somebody wants to hunt down
obsolete CSS.  There are probably better ways to
tackle this problem, so we should eventually just
remove this tool, but it's pretty low maintenance.

Current output looks like this:

    $ ./tools/find-unused-css
    actions_hovered
    actions_link
    bookend_tr
    btn-skip
    company-name
    flatpickr-months
    label_for_text
    loading_more_messages_indicator_box
    loading_more_messages_indicator_box_container
    logoimage
    messages-collapse
    messages-expand
    numInputWrapper
    page_loading_indicator_box
    page_loading_indicator_box_container
    skinny-user-gravatar
    sp-input
    summary_colorblock
    summary_row
    summary_row_private_message
    tutorial-done-button
2020-04-21 14:12:57 -07:00
Anders Kaseorg 392175d6e8 Use #!/usr/bin/env for bash shebangs.
/bin/sh and /usr/bin/env are the only two binaries that NixOS provides
at a fixed path (outside a buildFHSUserEnv sandbox).

This discussion was split from #11004.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-12-17 17:21:08 -08:00
Anders Kaseorg cd451491ff find-unused-css: Fix shellcheck warnings.
In tools/find-unused-css line 5:
    if [ $(git grep "$n" | grep -v '^static/styles/zulip.css' | wc -l) -eq 0 ]; then
         ^-- SC2046: Quote this to prevent word splitting.
                           ^-- SC2126: Consider using grep -c instead of grep|wc -l.

In tools/find-unused-css line 6:
        echo $n
             ^-- SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-08-03 09:15:26 -07:00
Tim Abbott 7d74c64f75 Add hackish tool for finding unused CSS. 2016-04-01 09:34:46 -07:00