diff options
author | Sarah German <sgerman@gitlab.com> | 2022-12-05 20:28:49 +0300 |
---|---|---|
committer | Sarah German <sgerman@gitlab.com> | 2022-12-05 20:28:49 +0300 |
commit | 2d2053e0ae729863b8c4e46a1d1393ba0dab8da2 (patch) | |
tree | 7ee29fcb3304a7920c7362b346d65f0df7f0bcbe /scripts | |
parent | 4e8dfa5af783c14cd1f92d12fd766ad40f734f71 (diff) |
Fix minify parameters
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/minify-assets.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/minify-assets.sh b/scripts/minify-assets.sh index cde1c20d..3cca8789 100755 --- a/scripts/minify-assets.sh +++ b/scripts/minify-assets.sh @@ -2,7 +2,7 @@ TARGET="$1" VER="$2" -MINIFY_FLAGS="--html-keep-document-tags --html-keep-whitespace --recursive" +MINIFY_FLAGS=("--html-keep-document-tags" "--html-keep-whitespace" "--recursive") if [ -z "$TARGET" ] || [ -z "$VER" ]; then echo "Usage: $0 <target> <ver>" @@ -33,9 +33,9 @@ fi # Minify assets printf "Optimizing assets..." -printf "HTML..."; $MINIFY_BIN "$MINIFY_FLAGS" --type=html --match="\.html$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true -printf "CSS..." ; $MINIFY_BIN "$MINIFY_FLAGS" --type=css --match="\.css$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true -printf "JSON..."; $MINIFY_BIN "$MINIFY_FLAGS" --type=json --match="\.json$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true -printf "SVG..." ; $MINIFY_BIN "$MINIFY_FLAGS" --type=svg --match="\.svg$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true +printf "HTML..."; $MINIFY_BIN "${MINIFY_FLAGS[@]}" --type=html --match="\.html$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true +printf "CSS..." ; $MINIFY_BIN "${MINIFY_FLAGS[@]}" --type=css --match="\.css$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true +printf "JSON..."; $MINIFY_BIN "${MINIFY_FLAGS[@]}" --type=json --match="\.json$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true +printf "SVG..." ; $MINIFY_BIN "${MINIFY_FLAGS[@]}" --type=svg --match="\.svg$" -o "${TARGET}/${VER}/" "${TARGET}/${VER}" || true echo "Done" |