diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-18 10:59:35 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-18 10:59:35 +0200 |
| commit | 3ed9fa051bd92c924980a796e414a5b3481b1921 (patch) | |
| tree | 9a65965c4057c2b1e75a0fff42ccc6c1c145ddd8 /mise.toml | |
| parent | f71b12241b5ceedc376906069493e6f742a3457f (diff) | |
improved mise config
Diffstat (limited to 'mise.toml')
| -rw-r--r-- | mise.toml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..93bee88 --- /dev/null +++ b/mise.toml @@ -0,0 +1,52 @@ +[tools] +"github:boyter/dcd" = "1.1.0" +go = "1.25.12" +node = "26.6.0" +watchexec = "latest" + +[env] +DATABASE_URL = "sqlite:biking_home.db" + +[tasks.generate] +description = "Generate templ Go files" +run = "go tool templ generate" + +[tasks.frontend-build] +description = "Compile TypeScript browser assets" +run = "npm run build" + +[tasks.check] +description = "Run formatting, TypeScript and Go gate checks" +depends = ["generate", "frontend-build"] +run = [ + "npm run format:check", + "npm run lint", + "npm run typecheck", + "npm test", + "go fmt ./...", + "go vet ./...", + "go build ./...", + "go test ./...", +] + +[tasks.build] +description = "Build the application" +depends = ["generate", "frontend-build"] +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 = "go tool dbmate up" + +[tasks.dev] +description = "Generate templates, compile TypeScript, and run the web server" +depends = ["generate", "frontend-build"] +run = "go run ." + +[tasks.dev-watch] +description = "Watch and restart the web server" +run = "mise watch dev --restart --exts go,templ,css,ts --ignore '*_templ.go'" |