73 lines
1.4 KiB
TOML
73 lines
1.4 KiB
TOML
[settings]
|
|
experimental = true
|
|
|
|
[deps.npm]
|
|
auto = true
|
|
dir = "web"
|
|
|
|
[deps.go]
|
|
auto = true
|
|
|
|
[tools]
|
|
go = "1.27.0"
|
|
node = "24.14.0"
|
|
|
|
[tasks.build]
|
|
description = "Build production single binary (web + Go, sequential)"
|
|
run = """
|
|
mise run build:web
|
|
mise run build:go
|
|
"""
|
|
|
|
[tasks."build:web"]
|
|
description = "Build Svelte frontend"
|
|
dir = "web"
|
|
run = "npm run build"
|
|
|
|
[tasks."build:go"]
|
|
description = "Build Go binary with embedded web assets"
|
|
run = "go build -trimpath -o wotra ."
|
|
|
|
[tasks.dev]
|
|
description = "Start PocketBase API and Vite dev server concurrently"
|
|
run = """
|
|
echo "PocketBase API: http://localhost:8080 (admin UI: /_/)"
|
|
echo "Vite UI: http://localhost:5173"
|
|
mise run dev:api & mise run dev:ui
|
|
wait
|
|
"""
|
|
|
|
[tasks."dev:api"]
|
|
description = "Start PocketBase API server"
|
|
run = "go run . serve --http=127.0.0.1:8080"
|
|
|
|
[tasks."dev:ui"]
|
|
description = "Start Vite dev server"
|
|
dir = "web"
|
|
run = "npm run dev"
|
|
|
|
[tasks.test]
|
|
description = "Run all Go tests"
|
|
run = "go test ./..."
|
|
|
|
[tasks."test:web"]
|
|
description = "Run frontend Vitest unit tests"
|
|
dir = "web"
|
|
run = "npm test"
|
|
|
|
[tasks."test:all"]
|
|
description = "Run Go tests and frontend Vitest tests"
|
|
depends = ["test", "test:web"]
|
|
|
|
[tasks.check]
|
|
description = "Lint and typecheck"
|
|
run = ["go vet ./...", "test -z \"$(gofmt -l .)\"", "npm --prefix web run check"]
|
|
|
|
[tasks.clean]
|
|
description = "Remove build artifacts"
|
|
run = """
|
|
rm -f wotra
|
|
rm -rf web/build web/.svelte-kit web/dev-dist
|
|
mkdir -p web/build && touch web/build/.gitkeep
|
|
"""
|