feat: configure syntax highlighting
This commit is contained in:
@@ -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"
|
||||
|
Reference in New Issue
Block a user