summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-10-17 03:26:58 +0100
committerdavidovski <david@davidovski.xyz>2023-10-17 03:26:58 +0100
commit59a76335613b836312f03a539e61c00a09b0962d (patch)
treebe44403f7ab1d14b6dbd9efa19c0c1844f5350de /build.sh
initial commit
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..ae7e042
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+name=pengui
+
+rm -rf build
+mkdir -p build
+
+cd build
+env GOOS=js GOARCH=wasm go build -o $name.wasm ..
+cp $(go env GOROOT)/misc/wasm/wasm_exec.js .
+cp ../index.html .
+
+[ "$1" = "serve" ] && gopherjs serve
+