222d9b7f0d
WHAT: compile, compress and place wasm module into the correct place WHY: easier usage/testing Change-Id: I06e83ef1bed9fc62366e1400ce5ed8942bd96633
14 lines
397 B
Bash
Executable File
14 lines
397 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Copy wasm javascript to match the go version
|
|
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" ./static/wasm
|
|
|
|
# Compress wasm javascript using brotli
|
|
brotli -k -f ./static/wasm/wasm_exec.js
|
|
|
|
# Build wasm code
|
|
GOOS=js GOARCH=wasm go build -o ./static/wasm/access.wasm storj.io/storj/satellite/console/wasm
|
|
|
|
# Compress wasm code using brotli
|
|
brotli -k -f ./static/wasm/access.wasm
|