-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
65 lines (53 loc) · 1.36 KB
/
Taskfile.yml
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
version: '3'
interval: 200ms
vars:
NAME: "site"
BIN_NAME: "{{.NAME}}"
tasks:
default:
deps: [live]
tools:
cmds:
- go install github.com/go-task/task/v3/cmd/task@latest
- go install github.com/a-h/templ/cmd/templ@latest
- go install github.com/delaneyj/toolbelt/sqlc-gen-zombiezen@latest
- go install golang.org/x/tools/cmd/goimports@latest
deps:
cmds:
- pnpm install
sqlc:
dir: sql
sources:
- "**/*.sql"
- "sqlc.yml"
cmds:
- sqlc generate
- goimports -w .
kill:
cmds:
- killall -q {{.BIN_NAME}} || echo "Process was not running."
- killall -q air || echo "Process was not running."
live:styles:
cmds:
- pnpx tailwindcss -c tailwind.config.js -i web/styles/styles.css -o static/index.css --watch
live:templ:
cmds:
- templ generate --watch -v
live:server:
deps:
- kill
cmds:
- |
go run github.com/air-verse/air@v1.52.3 \
--build.cmd "go build -tags dev -o tmp/bin/{{.BIN_NAME}} cmd/app/*.go" \
--build.bin "tmp/bin/{{.BIN_NAME}}" \
--build.delay "20" \
--build.exclude_dir "node_modules,data,public" \
--build.include_ext "go" \
--build.stop_on_error "false" \
--misc.clean_on_exit true
live:
deps:
- live:templ
- live:server
- live:styles