-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
45 lines (30 loc) · 905 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
37
38
39
40
41
42
43
44
# Build file for Waybeams workspace
GOPATH="${HOME}/go:${CURDIR}"
GOPHERJS="${HOME}/go/bin/gopherjs"
dev-install:
go mod download
clean:
rm -rf bin/*
test:
go test ./... | ./script/colorize
test-v:
go test -v ./... | ./script/colorize
bench:
go test ./... -bench=. | ./script/colorize
# Example Tasks
run: run-desktop
build: build-desktop build-js
run-desktop:
go run ./examples/todo/cmd/desktop/main.go
build-desktop:
go build -ldflags="-s -w" -o bin/desktop ./examples/todo/cmd/desktop/...
serve:
${GOPHERJS} serve ./examples/todo/cmd/browser/main.go
run-js:
${GOPHERJS} run ./examples/todo/cmd/browser/main.go
build-js:
GO111MODULE=on GOPATH=${GOPATH} ${GOPHERJS} build -m -o bin/todo.min.js ./examples/todo/cmd/browser/main.go
# gopherjs build -m -o bin/todo.min.js ./todo/cmd/browser/main.go
rm -f bin/todo.min.gz
gzip -c -8 bin/todo.min.js > bin/todo.min.gz
ls -la bin/