File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ <h1>{{- .Title -}}</h1>
2828 {{- $wasm_path := resources.Get "/playground/DLiteScript-playground-wasm" -}}
2929 {{- $worker_path := resources.Match "playground/js/worker/*.js" | resources.Concat "js/playground-worker.js" | js.Build $worker_opts | fingerprint -}}
3030
31+ {{- if not $wasm_path -}}
32+ {{- errorf "WASM file not found: /playground/DLiteScript-playground-wasm. Please build it first by running `./scripts/build-wasm.sh`." -}}
33+ {{- end -}}
34+
3135 < script >
3236 globalThis . playgroundWasmPath = "{{- $wasm_path.RelPermalink -}}"
3337 globalThis . playgroundWorkerPath = "{{- $worker_path.RelPermalink -}}"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+ cd " $( dirname " $0 " ) /.."
5+
6+ cd assets/playground
7+ GOOS=js GOARCH=wasm go build
8+
9+ # Hugo takes care of this if the file doesn't exist,
10+ # but we want to update the file in case it changes.
11+ cp DLiteScript-playground-wasm ../../public/playground/DLiteScript-playground-wasm
12+
13+ echo " WASM binary built successfully"
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- # Exit on error.
43set -e
5-
6- # Navigate to the root of the project.
74cd " $( dirname " $0 " ) /.."
85
9- # Run the tests.
106go test -bench=. ./... -benchmem -run notest
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- # Exit on error.
43set -e
5-
6- # Navigate to the root of the project.
74cd " $( dirname " $0 " ) /.."
85
9- # Create the output directory if it doesn't already exist.
106mkdir -p output
117
12- # Set the target platforms.
138PLATFORMS=(
149 " darwin-x64:darwin:amd64"
1510 " darwin-arm64:darwin:arm64"
You can’t perform that action at this time.
0 commit comments