build: replace install task with mise deps for automatic dependency management
This commit is contained in:
@@ -20,15 +20,14 @@ Tool versions are declared in `mise.toml`. Install [mise](https://mise.jdx.dev)
|
||||
### Development
|
||||
|
||||
```bash
|
||||
# Install frontend dependencies (first time only)
|
||||
mise run install
|
||||
|
||||
# Start both servers (Go API + Vite dev server)
|
||||
mise run dev
|
||||
# Go API: http://localhost:8080
|
||||
# Vite UI: http://localhost:5173 (with /api proxy)
|
||||
```
|
||||
|
||||
**Note**: Dependencies are automatically installed when needed. If you want to manually trigger dependency installation, run `mise deps`.
|
||||
|
||||
`AUTH_TOKEN` defaults to `devtoken` in `mise.toml`. Override it by setting the variable in your environment before running.
|
||||
|
||||
Open `http://localhost:5173`, go to **Settings**, enter your token.
|
||||
@@ -53,7 +52,7 @@ AUTH_TOKEN=mysecrettoken ./wotra
|
||||
| `mise run dev:api` | Start Go API server only |
|
||||
| `mise run dev:ui` | Start Vite dev server only |
|
||||
| `mise run test` | Run all Go tests |
|
||||
| `mise run install` | Install frontend npm dependencies |
|
||||
| `mise deps` | Install/update project dependencies |
|
||||
| `mise run clean` | Remove build artifacts |
|
||||
|
||||
## Configuration (environment variables)
|
||||
|
||||
16
mise.toml
16
mise.toml
@@ -1,7 +1,16 @@
|
||||
[settings]
|
||||
experimental = true
|
||||
|
||||
[deps.npm]
|
||||
auto = true
|
||||
dir = "web"
|
||||
|
||||
[deps.go]
|
||||
auto = true
|
||||
|
||||
[tools]
|
||||
go = "1.26.2"
|
||||
node = "24.14.0"
|
||||
npm = "latest"
|
||||
|
||||
[env]
|
||||
AUTH_TOKEN = "devtoken"
|
||||
@@ -56,11 +65,6 @@ run = "npm test"
|
||||
description = "Run Go tests and frontend Vitest tests"
|
||||
depends = ["test", "test:web"]
|
||||
|
||||
[tasks.install]
|
||||
description = "Install frontend npm dependencies"
|
||||
dir = "web"
|
||||
run = "npm install"
|
||||
|
||||
[tasks.clean]
|
||||
description = "Remove build artifacts"
|
||||
run = """
|
||||
|
||||
Reference in New Issue
Block a user