blob: 1f21ba916f6a54d8968884f2c734f921fb731b0a (
plain) (
blame)
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
|
[tools]
"github:boyter/dcd" = "1.1.0"
go = "1.25.12"
watchexec = "latest"
[tasks.generate]
description = "Generate templ Go files"
run = "go tool templ generate"
[tasks.format]
description = "Format Go sources"
run = "go fmt ./..."
[tasks.check]
description = "Run formatting, JavaScript and Go gate checks"
depends = ["generate", "format"]
run = [
"npm run format:check",
"npm run lint",
"npm run typecheck",
"for file in web/static/*.js; do node --check \"$file\"; done",
"node --test web/static_test/*.test.js",
"go vet ./...",
"go build ./...",
"go test ./...",
]
[tasks.build]
description = "Build the application"
run = "go build -o biking_home ."
[tasks.code-analysis]
description = "Run code analysis tools"
run = "dcd -i go -x '_test.go,templates_templ.go' -m 8 ."
[tasks.migrate]
description = "Apply SQLite migrations"
run = "DATABASE_URL=sqlite:biking_home.db go tool dbmate up"
[tasks.dev]
description = "Run the web server"
run = "go run ."
[tasks.dev-watch]
description = "Regenerate templates and run the web server"
run = ["mise run generate", "go run ."]
|