-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
85 lines (72 loc) · 1.83 KB
/
Copy pathTaskfile.yml
File metadata and controls
85 lines (72 loc) · 1.83 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# ntdiff - Copyright (c) 2026 Neomantra Corp.
version: '3'
tasks:
default:
desc: 'Default task runs the "test" and "build" tasks'
deps:
- test
- build
list:
desc: 'Lists available tasks'
cmds:
- task --list-all
###############################################################################
go-tidy:
desc: 'Go tidy all the things'
run: once
cmds:
- go mod tidy
go-update:
desc: 'Go update all the dependencies'
run: once
cmds:
- go get -u ./...
test:
desc: 'Run all Go tests'
cmds:
- go test ./...
build:
desc: 'Build the ntdiff binary'
deps:
- go-tidy
cmds:
- go build -o bin/ntdiff ./cmd/ntdiff
sources:
- diff/**/*.go
- cmd/ntdiff/*.go
- go.mod
- go.sum
generates:
- bin/ntdiff
clean:
desc: 'Clean built targets'
cmds:
- rm -f bin/ntdiff
- rm -rf .task
###############################################################################
# Demo website via booba
build-wasm-site:
desc: 'Build the WASM demo site into web/'
deps: [go-tidy]
cmds:
- GOARCH=wasm GOOS=js go build -o web/app.wasm ./cmd/ntdiff/
- go tool booba-assets web/
generates:
- web/app.wasm
serve-wasm-site:
desc: 'Serve web/ at http://localhost:8000/ntdiff/ (matches GH Pages prefix)'
deps: [build-wasm-site]
vars:
SERVE_DIR: /tmp/ntdiff-site
cmds:
- mkdir -p {{.SERVE_DIR}}
- rm -f {{.SERVE_DIR}}/ntdiff
- ln -sfn "$(pwd)/web" {{.SERVE_DIR}}/ntdiff
- echo 'Serving at http://localhost:8000/ntdiff/'
- cd {{.SERVE_DIR}} && python3 -m http.server 8000
clean-wasm-site:
desc: 'Remove WASM demo site artifacts'
cmds:
- rm -rf web/booba web/ghostty-web
- rm -f web/wasm_exec.js
- rm -f web/app.wasm