diff --git a/Makefile b/Makefile index b2084f5..4bb3c27 100644 --- a/Makefile +++ b/Makefile @@ -2,3 +2,10 @@ test: @PATH=$(CURDIR)/misc/wasm:$(PATH) GOOS=js GOARCH=wasm go test ./... +.PHONY: build-examples +build-examples: + for dir in $(shell find ./_examples -maxdepth 1 -type d); do \ + if [ $$dir = "./_examples" ]; then continue; fi; \ + cd $$dir && GOOS=js GOARCH=wasm go build -o ./build/app.wasm; \ + cd ../../; \ + done \ No newline at end of file