You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.5 KiB
2.5 KiB
+++ title = "Add justfiles for all projects with lint, check, build, build-release, and release recipes" priority = 5 status = "todo" ticket_type = "task" dependencies = [] +++
Background
The root TODO.md calls for each project in the mono-repo to have a justfile with standard recipe names so that any contributor can run the same commands regardless of project type. just is a command runner similar to Make but with cleaner syntax.
Recipes to add per project
| Recipe | What it runs |
|---|---|
lint |
Auto-format: cargo fmt, tofu fmt, mdbook build (edu), etc. |
check |
Static checks: cargo check && cargo clippy, tofu validate && tofu plan, etc. |
build |
Dev build: cargo build, trunk build, mdbook build |
build-release |
Optimised binary or bundle: cargo build --release, trunk build --release |
release |
Deploy/publish: tofu apply, wrangler deploy (where applicable) |
Not every project needs every recipe; stub missing ones with an error or a no-op comment.
Per-project breakdown
nbd/justfile
lint:cargo fmtcheck:cargo check && cargo clippy && cargo testbuild:cargo buildbuild-release:cargo build --releaserelease: n/a (CLI tool, no deployment)
edu/justfile
lint:mdbook build(build validates the content)check:mdbook buildbuild:mdbook buildbuild-release: same asbuild(mdbook has no separate release mode)release: TBD — CF Pages auto-deploys from main branch once infra is configured (see edu deployment ticket)
quotesdb/api/justfile
lint:cargo fmtcheck:cargo check && cargo clippybuild:cargo buildbuild-release:cargo build --releaserelease:wrangler deploy(ortofu applyfrominfra/)
quotesdb/ui/justfile
lint:cargo fmtcheck:cargo check && cargo clippybuild:trunk buildbuild-release:trunk build --releaserelease: CF Pages auto-deploys from main branch once infra is configured
Files to create
nbd/justfileedu/justfilequotesdb/api/justfilequotesdb/ui/justfile
Conventions
- Recipe names must be consistent across all projects (
lint,check,build,build-release,release). - Commands are run from the directory containing the
justfile, so paths are relative to the project directory. - Add a comment above each recipe explaining what it does.
- Check whether the
justpackage is already in each project's Nix dev shell (flake.nix); add it if missing.