fixing dockerfile again
All checks were successful
Homepage Build and Deploy / Build Homepage Image (push) Successful in 10m13s
Homepage Build and Deploy / Deploy Homepage (push) Successful in 30s

This commit is contained in:
2025-11-24 06:56:30 -03:00
parent fdb75385cb
commit a376c8157a
3 changed files with 15 additions and 51 deletions

View File

@@ -1,39 +0,0 @@
#!/bin/bash
# Minify a JavaScript file in-place
# Usage: ./minify.sh <file.js>
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <file.js>"
exit 1
fi
FILE="$1"
if [ ! -f "$FILE" ]; then
echo "Error: File '$FILE' not found"
exit 1
fi
# Check if the file is a JavaScript file
if [[ ! "$FILE" =~ \.js$ ]]; then
echo "Error: File must have .js extension"
exit 1
fi
# Minify the file using a simple approach with sed and tr
# This removes comments, extra whitespace, and newlines
TMP_FILE="${FILE}.tmp"
# Remove single-line comments, multi-line comments, and compress whitespace
sed 's|//.*$||g' "$FILE" | \
tr '\n' ' ' | \
sed 's|/\*.*\*/||g' | \
sed 's/[[:space:]]\+/ /g' | \
sed 's/[[:space:]]*\([{};,=()[\]<>+\-*/%!&|?:]\)[[:space:]]*/\1/g' | \
sed 's/^[[:space:]]*//;s/[[:space:]]*$//' > "$TMP_FILE"
# Replace original file with minified version
mv "$TMP_FILE" "$FILE"
echo "Minified: $FILE"