From 73ee0e887fe68f25dc897059da3a0a49f2d5d9c9 Mon Sep 17 00:00:00 2001 From: Tammo ter Hark Date: Mon, 30 Nov 2026 12:32:46 +0100 Subject: [PATCH] docs(readme): align variants build/rebuild docs with the current process (rows 239-240) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Build process: document the naming convention (folder/json respondage_, metadata name must equal the file name, title ' LimeSurvey theme', e.g. respondage_defensie -> 'Defensie LimeSurvey theme') and the shortcut of starting a new variant by copying an existing client json — plus the caution that build_all.sh builds EVERY *.json in the definitions dir, so don't run it while a copied json is still unadjusted. - Rebuild process: note that build_all.sh prints a 'N built, M failed' summary, exits non-zero on any failure, and that build.php enforces the per-variant rules itself (preview.svg first-creation-only + never overwritten, identical-preview.png warning). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- README.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8100418..69e4cf4 100644 --- a/README.md +++ b/README.md @@ -377,14 +377,23 @@ the variant's `preview.png` is identical to the mother's. 2. In the private variants repo, create `variants/.json` with the variant name/title/description and only the house-style option keys with the client values, plus a `/` asset folder (logos, `files/fonts/`, - `css/variant.css`, `files/preview.svg`/`preview.png`): + `css/variant.css`, `files/preview.svg`/`preview.png`). + Naming convention: folder/json `respondage_`, metadata `name` + `respondage_` (must equal the file name), `title` + `" LimeSurvey theme"` (e.g. `respondage_acme` → + "Acme LimeSurvey theme"). Easiest start: copy an existing client json + (`cp respondage_acme.json respondage_.json`), set `name`, and + adjust title/description/options/assets afterwards. ```json { "name": "respondage_client", - "title": "Client Vanilla", + "title": "Client LimeSurvey theme", "options": { "primarycolor": "#123456", "fontsize": "18px" } } ``` + CAUTION: `build_all.sh` (step below) builds EVERY `*.json` in the + definitions dir — do not run it while a just-copied json is still + unadjusted, it would rebuild that variant with the copied values. 3. Run `php variants/build.php `. This generates `..//config.xml`: a copy of this theme's config.xml with only those option values replaced, `` set to this theme, and the `` @@ -416,9 +425,13 @@ the variant's `preview.png` is identical to the mother's. ``` (`` defaults to `variants/` or `$RESPONDAGE_VARIANTS_DIR`; set `PHP_BIN=/path/to/php` if `php` is not on PATH.) It loops over every - `*.json` in the definitions dir, calls `build.php` per variant, and fails - non-zero if any variant fails. Then, per rebuilt variant: reset the theme in - the LimeSurvey admin (Theme options → Reset), flush assets, Ctrl+F5. + `*.json` in the definitions dir, calls `build.php` per variant, prints a + summary (`N built, M failed`) and exits non-zero if any variant fails + (unknown option keys fail loudly — the drift check). Then, per rebuilt + variant: reset the theme in the LimeSurvey admin (Theme options → Reset), + flush assets, Ctrl+F5. `build.php` enforces the per-variant rules itself: + `files/preview.svg` is only added at first creation and never overwritten, + and it warns when a variant's `preview.png` is identical to the mother's. Never edit the generated `..//` folder by hand — every build OVERWRITES its files from the definitions dir, EXCEPT `files/preview.svg` (first-creation-only, see above). A variant folder that is not rebuilt after