Skip to content

Commit f5f37a6

Browse files
author
Callin Mullaney
committed
chore: add Twig story audit script
1 parent 7adec0a commit f5f37a6

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

UPGRADE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ Emulsify 7.x is a breaking release. Plan the upgrade as a theme-platform change,
3333
- Frontend workflow references should move from Webpack-based build workflow commands and docs to the Vite-based build workflow shipped in 7.x.
3434
- `whisk` remains a starter source only. Do not enable it as a runtime parent theme.
3535

36+
## Twig Story Migration Audit
37+
38+
Generated themes include an audit command for reviewing older Twig stories that
39+
should move to Emulsify Core's preferred `renderTwig()` helper:
40+
41+
```bash
42+
npm run audit:twig-stories
43+
```
44+
45+
The command prints a report of likely legacy Storybook files and links to the
46+
Emulsify Core Storybook migration documentation. Existing Twig stories that
47+
return HTML strings can continue rendering during the upgrade, but actively
48+
maintained stories should be migrated to `renderTwig()` as they are touched.
49+
3650
## Theme Architecture Changes
3751

3852
- `stable9` is no longer the parent theme. Emulsify now ships its own full template layer.

whisk/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"type": "module",
1919
"scripts": {
2020
"a11y": "npm run storybook-build && node_modules/@emulsify/core/scripts/a11y.js -r",
21+
"audit:twig-stories": "sh -c 'node_modules/@emulsify/core/scripts/audit-twig-stories.js \"$@\"; status=$?; printf \"\\nMigration docs: https://github.com/emulsify-ds/emulsify-core/blob/4.x/docs/storybook.md#legacy-twig-story-compatibility\\n\"; exit $status' --",
2122
"build": "npm run ensure-dist && vite --config node_modules/@emulsify/core/config/vite/vite.config.js",
2223
"coverage": "npm run test && open-cli .coverage/lcov-report/index.html",
2324
"develop": "npm run ensure-dist && concurrently --raw --no-shell npm:vite npm:storybook",

0 commit comments

Comments
 (0)