feat: configure syntax highlighting

This commit is contained in:
Max Richter
2025-09-30 21:01:26 +02:00
parent 2a1572f99d
commit c2179c6d22
8 changed files with 72 additions and 11 deletions

View File

@@ -8,15 +8,11 @@ OUT_WASM="$OUT_DIR/main.wasm"
mkdir -p "$OUT_DIR"
tinygo build -target=wasm \
-opt=z -no-debug -panic=print -gc=leaking \
-no-debug -panic=print -gc=leaking \
-o "$OUT_WASM" "$SCRIPT_DIR"
# Optional post-process (run only if tools exist)
command -v wasm-opt >/dev/null && wasm-opt -Oz --strip-debug --strip-dwarf --strip-producers \
-o "$OUT_WASM.tmp" "$OUT_WASM" && mv "$OUT_WASM.tmp" "$OUT_WASM"
# command -v wasm-strip >/dev/null && wasm-strip "$OUT_WASM"
# command -v brotli >/dev/null && brotli -f -q 11 "$OUT_WASM" -o "$OUT_WASM.br"
# command -v gzip >/dev/null && gzip -c -9 "$OUT_WASM" > "$OUT_WASM.gz"
# Copy TinyGo runtime
cp -f "$(tinygo env TINYGOROOT)/targets/wasm_exec.js" "$OUT_DIR/wasm_exec.js"