-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
36 lines (26 loc) · 916 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
build:
@go build -C ./src/cmd/duwa -o ../../../bin/duwa
build-wasm:
set TEMP=U:\projects\skybox\duwa\chewa\temp
@GOOS=js GOARCH=wasm tinygo build -o ../duwa-site/public/duwa.wasm -opt 1 ./src/cmd/wasm/duwa.go
build-docker:
@docker-compose up -d
@docker-compose exec tinygo-dev tinygo build -o ./bin/duwa.wasm -opt 1 -target=wasm ./src/cmd/wasm/duwa.go
@docker-compose exec tinygo-dev cp /tinygo/targets/wasm_exec.js /app/bin/
@cp ./bin/duwa.wasm ../duwa-site/public/duwa.wasm
@cp ./bin/wasm_exec.js ../duwa-site/public/wasm_exec.js
@docker-compose stop
build-all: build build-wasm
dev:
@go run ./src/cmd/duwa/duwa.go
run: build
@./bin/duwa
lint:
@golangci-lint run -c ./golangci.yml ./...
test:
@go test ./... -v --cover
test-report:
@go test ./... -v --cover -coverprofile=coverage.out
@go tool cover -html=coverage.out
docs-json:
@go run src/cmd/tools/*