Bundle wasm file to prevent full Clang and LLVM build
This commit is contained in:
15
build-compress.sh
Executable file
15
build-compress.sh
Executable 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/
|
||||
@@ -29,13 +29,4 @@ export PATH="$PATH:$(realpath ./build/release/tinygo/bin/)"
|
||||
|
||||
popd
|
||||
|
||||
go generate ./...
|
||||
|
||||
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/
|
||||
go generate ./...
|
||||
1
challenge/js-pow-sha256/runtime/.gitignore
vendored
1
challenge/js-pow-sha256/runtime/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*.wasm
|
||||
BIN
challenge/js-pow-sha256/runtime/runtime.wasm
Normal file
BIN
challenge/js-pow-sha256/runtime/runtime.wasm
Normal file
Binary file not shown.
@@ -262,6 +262,7 @@ rules:
|
||||
- name: homesite
|
||||
conditions:
|
||||
- 'path == "/"'
|
||||
# generic /*/*/ match gave too many options for scrapers to trigger random endpoints
|
||||
- 'path.matches("(?i)^/(WeebDataHoarder|P2Pool|mirror|git|S\\.O\\.N\\.G|FM10K|Sillycom|pwgen2155|kaitou|metonym)/[^/]+$")'
|
||||
action: pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user