Skip to content

Commit

Permalink
compress static files in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Jul 21, 2021
1 parent c134314 commit 1f94fc9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions process-static
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ find static_tmp -name '*.html' -exec html-minifier --collapse-whitespace \
--remove-style-link-type-attributes --sort-attributes --sort-class-name {} -o {} \;

find static_tmp -name '*.xml' -exec xmllint --noblanks {} --output {} \;
find static_tmp -regex '.+\.\(css\|html\|ico\|js\|json\|svg\|txt\|webmanifest\|xml\)' \
-exec zopfli {} \; -exec touch -r {} {}.gz \; \
-exec brotli -k {} \;
find static_tmp -regex '.+\.\(css\|html\|ico\|js\|json\|svg\|txt\|webmanifest\|xml\)' |
parallel "brotli -k {}; zopfli {} && touch -r {} {}.gz"

0 comments on commit 1f94fc9

Please sign in to comment.