From 47cde0d27934255d1a4d05747ce334dd2b045923 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Tue, 10 Nov 2026 14:02:35 -0800 Subject: [PATCH] build(just): docgen writes the pages of the docs site into starlight/, in their final form `just docgen` takes no path now: it runs schemars-docgen from the tree (a member of the workspace) and komorebic, writes the schema pages and the per-command pages into starlight/, and runs the script of the site that makes the komorebic page of the platform from them, so nothing is left for `npm run build` to generate. Only Windows and macOS have pages in the site. Co-Authored-By: Claude Sonnet 5.5 --- justfile | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/justfile b/justfile index f6966975..ed82f5cb 100644 --- a/justfile +++ b/justfile @@ -210,12 +210,29 @@ docgen-local: docgen-local: {{ cargo_stable }} run --package komorebic --locked -- docgen --output docs/{{ platform }}/cli -# the reference pages of the Windows or macOS site, from the schemas and the command line -docgen starlight: +# the docs site, in this repository +starlight := "starlight" + +# schemars-docgen, built from this tree: the tool is a member of the workspace (crates/schemars-docgen) +schemars_docgen := cargo_stable + " run --package schemars-docgen --locked --" + +# What it writes: the configuration and bar schema pages (schemars-docgen, from schemas//), the page of every +# komorebic command (komorebic docgen) and the one komorebic page of the platform that the site makes from them. + +# the reference pages of the docs site for this platform, in their final form, into starlight/ +[macos] +[windows] +docgen: rm {{ starlight }}/src/data/cli/{{ platform }}/*.md - {{ cargo_stable }} run --package komorebic -- docgen --output {{ starlight }}/src/data/cli/{{ platform }} - schemars-docgen ./schemas/{{ platform }}/schema.json --output {{ starlight }}/src/content/docs/reference/komorebi-{{ platform }}.mdx --title "komorebi.json ({{ platform }})" --description "komorebi configuration schema reference for {{ platform }}" - schemars-docgen ./schemas/{{ platform }}/schema.bar.json --output {{ starlight }}/src/content/docs/reference/bar-{{ platform }}.mdx --title "komorebi.bar.json ({{ platform }})" --description "komorebi-bar configuration schema reference for {{ platform }}" + {{ cargo_stable }} run --package komorebic --locked -- docgen --output {{ starlight }}/src/data/cli/{{ platform }} + {{ schemars_docgen }} schemas/{{ platform }}/schema.json --output {{ starlight }}/src/content/docs/reference/komorebi-{{ platform }}.mdx --title "komorebi.json ({{ platform }})" --description "komorebi configuration schema reference for {{ platform }}" + {{ schemars_docgen }} schemas/{{ platform }}/schema.bar.json --output {{ starlight }}/src/content/docs/reference/bar-{{ platform }}.mdx --title "komorebi.bar.json ({{ platform }})" --description "komorebi-bar configuration schema reference for {{ platform }}" + node {{ starlight }}/scripts/generate-cli-reference.cjs + +# the site has the pages of Windows and macOS only; the Linux documents are docs/linux +[linux] +docgen: + @echo "the docs site has no pages for Linux: run this on Windows or macOS" && exit 1 # schemars-nixgen, built from this tree: the tool is a member of the workspace (crates/schemars-nixgen) nixgen := cargo_stable + " run --package schemars-nixgen --locked --"