docs(readme): align variants build/rebuild docs with the current process (rows 239-240)
- Build process: document the naming convention (folder/json respondage_<client>, metadata name must equal the file name, title '<Client> 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 <vibe@mistral.ai>
This commit is contained in:
parent
ba0a5999dc
commit
73ee0e887f
1 changed files with 18 additions and 5 deletions
23
README.md
23
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/<client>.json` with the
|
||||
variant name/title/description and only the house-style option keys with the
|
||||
client values, plus a `<client>/` 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_<client>`, metadata `name`
|
||||
`respondage_<client>` (must equal the file name), `title`
|
||||
`"<Client> LimeSurvey theme"` (e.g. `respondage_acme` →
|
||||
"Acme LimeSurvey theme"). Easiest start: copy an existing client json
|
||||
(`cp respondage_acme.json respondage_<client>.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 <client> <definitions-dir>`. This generates
|
||||
`../<client>/config.xml`: a copy of this theme's config.xml with only those
|
||||
option values replaced, `<extends>` set to this theme, and the `<engine>`
|
||||
|
|
@ -416,9 +425,13 @@ the variant's `preview.png` is identical to the mother's.
|
|||
```
|
||||
(`<definitions-dir>` 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 `../<client>/` 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue