From 8b75f28999927c3c0f57193c235fb5b7ea57a0e1 Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Mon, 4 May 2020 12:27:33 +0200 Subject: Minify the assets in the build base job --- scripts/minify-assets.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/minify-assets.sh b/scripts/minify-assets.sh index 02562039..a0b5bfb7 100755 --- a/scripts/minify-assets.sh +++ b/scripts/minify-assets.sh @@ -2,6 +2,7 @@ TARGET="$1" VER="$2" +MINIFY_FLAGS="--html-keep-document-tags --html-keep-whitespace --recursive" if [ -z "$TARGET" -o -z "$VER" ]; then echo "Usage: $0 " @@ -17,9 +18,9 @@ fi # Minify assets printf "Optimizing assets..." -printf "HTML..."; /scripts/minify -r --type=html --match=\.html -o ${TARGET}/${VER}/ ${TARGET}/${VER} || true -printf "CSS..." ; /scripts/minify -r --type=css --match=\.css -o ${TARGET}/${VER}/ ${TARGET}/${VER} || true -printf "JSON..."; /scripts/minify -r --type=json --match=\.json -o ${TARGET}/${VER}/ ${TARGET}/${VER} || true -printf "SVG..." ; /scripts/minify -r --type=svg --match=\.svg -o ${TARGET}/${VER}/ ${TARGET}/${VER} || true +printf "HTML..."; /scripts/minify $MINIFY_FLAGS --type=html --match=\.html -o ${TARGET}/${VER}/ ${TARGET}/${VER} || true +printf "CSS..." ; /scripts/minify $MINIFY_FLAGS --type=css --match=\.css -o ${TARGET}/${VER}/ ${TARGET}/${VER} || true +printf "JSON..."; /scripts/minify $MINIFY_FLAGS --type=json --match=\.json -o ${TARGET}/${VER}/ ${TARGET}/${VER} || true +printf "SVG..." ; /scripts/minify $MINIFY_FLAGS --type=svg --match=\.svg -o ${TARGET}/${VER}/ ${TARGET}/${VER} || true echo "Done" -- cgit v1.2.3