Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah German <sgerman@gitlab.com>2022-12-05 20:28:49 +0300
committerSarah German <sgerman@gitlab.com>2022-12-05 20:28:49 +0300
commit2d2053e0ae729863b8c4e46a1d1393ba0dab8da2 (patch)
tree7ee29fcb3304a7920c7362b346d65f0df7f0bcbe /scripts
parent4e8dfa5af783c14cd1f92d12fd766ad40f734f71 (diff)
Fix minify parameters
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/minify-assets.sh10
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"