Skip to content

Commit

Permalink
add command to build examples to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
syumai committed Apr 16, 2024
1 parent 91dafbf commit c87cca2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c87cca2

Please sign in to comment.