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