Makefile 598 B

12345678910111213141516171819202122232425
  1. .PHONY: wasm
  2. wasm:
  3. GOOS=js GOARCH=wasm go build -o ./web/webwormhole.wasm ./web
  4. cp $(shell go env GOROOT)/misc/wasm/wasm_exec.js ./web/wasm_exec.js
  5. .PHONY: webwormhole-ext.zip
  6. webwormhole-ext.zip: wasm
  7. zip -j webwormhole-ext.zip ./web/* -x '*.git*' '*.go' '*Dockerfile'
  8. .PHONY: webwormhole-src.zip
  9. webwormhole-src.zip:
  10. zip -r -FS webwormhole-src.zip * -x '*.git*' webwormhole-src.zip webwormhole-ext.zip
  11. .PHONY: all
  12. all: webwormhole-ext.zip
  13. .PHONY: fmt
  14. fmt:
  15. prettier -w --use-tabs web/*.ts
  16. go fmt ./...
  17. .PHONY: js
  18. js:
  19. tsc -T ES2018 --strict web/ww.ts
  20. tsc -T ES2018 --strict web/sw.ts