Bundle wasm file to prevent full Clang and LLVM build

This commit is contained in:
WeebDataHoarder
2025-04-01 07:04:47 +02:00
parent bfcb0ccada
commit 8ed0f69a19
5 changed files with 17 additions and 11 deletions

15
build-compress.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -e
set -o pipefail
cd "$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
do_compress () {
find "$1" \( -type f -name "*.wasm" -o -name "*.css" -o -name "*.js" -o -name "*.mjs" \) -exec zopfli {} \;
find "$1" \( -type f -name "*.wasm" -o -name "*.css" -o -name "*.js" -o -name "*.mjs" \) -exec brotli -v -f -9 -o {}.br {} \;
#find "$1" \( -type f -name "*.wasm" -o -name "*.css" -o -name "*.js" -o -name "*.mjs" \) -exec zstd -v -f -19 -o {}.zst {} \;
}
do_compress challenge/
do_compress assets/