Skip to content

Commit 386357a

Browse files
committed
Add a warning about why files aren't minified
Explain the two conditions.
1 parent 4556a0e commit 386357a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

minify.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ do
5353
fi
5454
elif [ $(wc -l "$filename.$filetype" | awk '{print $1}') -ge 15 ] || [ $(grep -E $'^(\t|\ )' "$filename.$filetype" | wc -l) -ge 5 ]; then
5555
do_min=1
56+
else
57+
echo.Red "$filename.$filetype is small enough, not been minified:"
58+
echo.Yellow "It doesn't have more than 15 lines."
59+
echo.Yellow "Or it doesn't have more than 5 lines with tab(s) or blank(s) in the head of sentences."
5660
fi
5761
MAP_OP=""
5862
if [ 0 -lt $do_min ]; then

0 commit comments

Comments
 (0)