Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions minify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ do
fi
elif [ $(wc -l "$filename.$filetype" | awk '{print $1}') -ge 15 ] || [ $(grep -E $'^(\t|\ )' "$filename.$filetype" | wc -l) -ge 5 ]; then
do_min=1
else
echo.Yellow "$filename.$filetype is small enough, not be minified:"
echo.Yellow "It doesn't have more than 15 lines."

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not over 15 lines.

echo.Yellow "Or it doesn't have more than 5 lines with tab(s) and blank(s) in the head of sentences."

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or it's not over 5 lines with tab(s) and blank(s) in the head of sentences.

@maruilian11 maruilian11 Nov 23, 2017

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be the following reasons:
It doesn't have more than 15 lines.
It's not over 5 lines with tab(s) in the head of sentences.
It's not over 5 lines with blank(s) in the head of sentences.

@maruilian11 maruilian11 Nov 23, 2017

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer this one

Could be the following reasons:
It doesn't have more than 15 lines.
It's not over 5 lines with tab/blank(s) in the head of sentences.

fi
MAP_OP=""
if [ 0 -lt $do_min ]; then
Expand Down