74 lines
1.3 KiB
TOML
74 lines
1.3 KiB
TOML
[settings]
|
|
experimental = true
|
|
|
|
[deps.npm]
|
|
auto = true
|
|
dir = "web"
|
|
|
|
[deps.go]
|
|
auto = true
|
|
|
|
[tools]
|
|
go = "1.26.2"
|
|
node = "24.14.0"
|
|
|
|
[env]
|
|
AUTH_TOKEN = "devtoken"
|
|
PORT = "8080"
|
|
DB_PATH = "wotra.db"
|
|
TZ = "UTC"
|
|
|
|
[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 -tags production -o wotra ./cmd/wotra"
|
|
|
|
[tasks.dev]
|
|
description = "Start Go API and Vite dev server concurrently"
|
|
run = """
|
|
echo "Go API: http://localhost:${PORT}"
|
|
echo "Vite UI: http://localhost:5173"
|
|
mise run dev:api & mise run dev:ui
|
|
wait
|
|
"""
|
|
|
|
[tasks."dev:api"]
|
|
description = "Start Go API server"
|
|
run = "go run ./cmd/wotra"
|
|
|
|
[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.clean]
|
|
description = "Remove build artifacts"
|
|
run = """
|
|
rm -f wotra
|
|
rm -rf web/build web/.svelte-kit
|
|
"""
|