File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 go get -u github.com/php-any/origami@main
2828 go mod tidy
2929 GOOS=js GOARCH=wasm go build -o ../public/wasm/origami.wasm .
30- # Copy wasm_exec.js from GOROOT to public folder
31- cp $(go env GOROOT)/misc/wasm/wasm_exec.js ../public/wasm_exec.js
30+ # Try to locate and copy wasm_exec.js more robustly
31+ GOROOT=$(go env GOROOT)
32+ if [ -f "$GOROOT/misc/wasm/wasm_exec.js" ]; then
33+ cp "$GOROOT/misc/wasm/wasm_exec.js" ../public/wasm_exec.js
34+ elif [ -f "$GOROOT/lib/wasm/wasm_exec.js" ]; then
35+ cp "$GOROOT/lib/wasm/wasm_exec.js" ../public/wasm_exec.js
36+ else
37+ echo "Warning: wasm_exec.js not found in GOROOT. Downloading from CDN as fallback."
38+ curl -L https://cdn.jsdelivr.net/gh/golang/go@master/misc/wasm/wasm_exec.js -o ../public/wasm_exec.js
39+ fi
3240 cd ..
3341
3442 - name : Setup Node
You can’t perform that action at this time.
0 commit comments