justfile: default to recipe list; comment every recipe

- 'just' with no arguments now shows the available recipes (default
  recipe runs 'just --list') instead of starting the dev backend.
- Every recipe now has a doc comment; for multi-line comments the
  summary is the last line, since that is what 'just --list' displays.

Co-Authored-By: Qwen3.8 27b
AuthorKonata <konata@posteo.jp>
Date
Commit75081e5a3ced5c635e079a23548d966551ecbcb4
Parenteef2607
1 file changed, 11 insertions(+), 8 deletions(-)
▾Mjustfile
@@ -3,20 +3,23 @@
dev-root := '.dev/root'
dev-db := '.dev/db.sqlite'
default: dev
# Show the available recipes (runs when you type `just` without arguments).
default:
@just --list
# Create the dev root folder.
dev-data:
mkdir -p {{dev-root}}
# Backend (dev): serves the frontend from Trunk's output directory.
# Frontend dev server: just dev-web (port 8080)
# Backend dev server: just dev-server (port 8081, /api proxied by Trunk)
# Also run `just dev-web` for the HMR frontend dev server on :8080.
# Start the dev backend on :8081 (creates the dev root folder first).
dev: dev-data dev-server
# Dev backend on :8081 — the API plus static files from web/dist (no HMR).
dev-server:
cargo run -p server -- --root {{dev-root}} --db {{dev-db}} --port 8081
# Frontend dev server on :8080 (Trunk with HMR; proxies /api to :8081).
dev-web: build-cm
cd web && trunk serve --proxy-rewrite /api --proxy-backend http://127.0.0.1:8081
@@ -30,14 +33,14 @@ frontend: build-cm
build: frontend
cargo build --release -p server --features embedded
# Production end-to-end: build the real frontend, embed it, and run the full
# server test suite against the embedded assets.
# Production end-to-end: build the real frontend, embed it, and run the full server test suite.
e2e: frontend
cargo test -p server --features embedded
# Requires bun (https://bun.sh); web/bun.lock pins the dependencies and
# web/cm6.js is a gitignored build artifact. Runs automatically via `build`,
# `dev-web` and `e2e`.
# Build the vendored CodeMirror bundle (web/cm6.js) from web/cm/wrapper.js.
# web/cm6.js is a gitignored build artifact; web/bun.lock pins the dependencies.
# Runs automatically via `build`, `dev-web` and `e2e`. Requires bun (https://bun.sh).
build-cm:
cd web && bun install --frozen-lockfile && bun run build