From d841e91d8cdd928dd17a0c88e77188d4df9ae467 Mon Sep 17 00:00:00 2001 From: Emily Date: Mon, 10 Feb 2025 04:14:56 +0100 Subject: [PATCH] dev: add a Justfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This lets us run common commands as `just ` and reference them in the docs. `just` is a popular alternative to managing project-specific commands in Makefiles. The nice parts are: - Fewer syntax footguns - Command descriptions and groups Example: ``` ❯ just Available recipes: format # Format all code update-cli-reference # Update generated CLI help (cli/tests/cli-reference@.md.snap) [docs] build-docs # Build documentation into rendered-docs/ for offline use serve-docs # Preview documentation with live reloading ``` --- Justfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Justfile diff --git a/Justfile b/Justfile new file mode 100644 index 00000000000..fc2e99b2372 --- /dev/null +++ b/Justfile @@ -0,0 +1,21 @@ +[private] +default: + @just --list + +# Format all code +format: + cargo +nightly fmt + +# Update generated CLI help (cli/tests/cli-reference@.md.snap) +update-cli-reference: + cargo insta test --accept --workspace -- test_generate_md_cli_help + +# Preview documentation with live reloading +[group('docs')] +serve-docs: + uv run mkdocs serve + +# Build documentation into rendered-docs/ for offline use +[group('docs')] +build-docs: + uv run mkdocs build -f mkdocs-offline.yml