@pressgang-wp/shakedown 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/sandbox.mjs +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ Optional `shakedown.config.json` in the theme, for overrides only:
|
|
|
45
45
|
|
|
46
46
|
Authored journeys (form submissions, checkout flows) live in your theme's `tests/e2e/` — when present they run alongside the derived passes as the `journeys` project.
|
|
47
47
|
|
|
48
|
-
**Seeding is convention-first.** If your theme ships [Muster](https://github.com/pressgang-wp/pressgang-muster) seeders (`
|
|
48
|
+
**Seeding is convention-first.** If your theme ships [Muster](https://github.com/pressgang-wp/pressgang-muster) seeders (a top-level `muster/` directory), the sandbox runs them via `wp capstan seed` as the baseline — your real menus, terms and pages — then layers the derived populated/minimal ACF state fixtures on top. A theme that ships no seeders is unaffected: the derived layer covers it on its own, so it does a good job out of the box.
|
|
49
49
|
|
|
50
50
|
Sandbox fixture randomness and time are separate deterministic inputs. `seed`
|
|
51
51
|
controls generated values; `epoch` fixes relative dates used by Muster,
|
package/lib/sandbox.mjs
CHANGED
|
@@ -314,7 +314,7 @@ export async function bootSandbox(target, options = {}) {
|
|
|
314
314
|
|
|
315
315
|
/**
|
|
316
316
|
* Convention-first baseline seeding: run the theme's OWN Muster seeders
|
|
317
|
-
* (anything under its `
|
|
317
|
+
* (anything under its `muster/` directory) via `wp capstan seed`, so a theme that
|
|
318
318
|
* ships fixtures gets its real content — menus assigned to locations, terms,
|
|
319
319
|
* pages, relationships — exactly as `wp capstan seed` produces on a dev site.
|
|
320
320
|
* The ACF state fixtures (see {@link seedAcfStates}) then layer on top.
|
|
@@ -329,7 +329,8 @@ export async function bootSandbox(target, options = {}) {
|
|
|
329
329
|
* @returns {boolean} True when theme seeders ran; false when none were applied.
|
|
330
330
|
*/
|
|
331
331
|
export function seedThemeMuster(sandbox, { seed = 42 } = {}) {
|
|
332
|
-
|
|
332
|
+
// Seeders live in a top-level `muster/` directory (mapped under autoload-dev).
|
|
333
|
+
const musterDir = join(sandbox.root, 'wp-content', 'themes', sandbox.theme ?? '', 'muster');
|
|
333
334
|
|
|
334
335
|
if (!sandbox.theme || !existsSync(musterDir)) {
|
|
335
336
|
return false;
|