Skip to content

Align the front-office asset stack on AssetMapper and Tailwind CLI - #6

Merged
anoziere merged 1 commit into
mainfrom
docs/align-flexy-stack-with-assetmapper
Aug 18, 2026
Merged

Align the front-office asset stack on AssetMapper and Tailwind CLI#6
anoziere merged 1 commit into
mainfrom
docs/align-flexy-stack-with-assetmapper

Conversation

@anoziere

Copy link
Copy Markdown
Member

Why

The Flexy front-office theme moved from Webpack Encore 4 + Tailwind 3 + PostCSS to AssetMapper + Tailwind v4, and it no longer ships a package.json. Most of the plugin was already aligned on that; this pass closes the statements that were still describing the old stack, plus a few that contradicted each other inside the same file.

Before: Webpack Encore + npm, Tailwind 3 with tailwind.config.js, @symfony/stimulus-bridge, a dist/ served through templates-assets/.

After (front office, Flexy): AssetMapper (importmap.php, vendors downloaded into a git-ignored assets/vendor/), Tailwind v4 compiled by symfonycasts/tailwind-bundle from assets/styles/app.css (CSS-first, no JS config), Stimulus started by startStimulusApp() from @symfony/stimulus-bundle, output served under /assets/frontOffice/{theme}/.

The back office is unchanged and stays on Webpack Encore with npm install && npm run builddefault-twig still ships a package.json and a webpack.config.js writing to templates-assets/backOffice/{theme}/dist. Every npm instruction left in the plugin targets that theme only.

What is corrected

File Was Is
skills/thelia3/SKILL.md "no Turbo/Mercure"; "Turbo/Mercure are ABSENT" Mercure is absent, Turbo ships with Drive off by default
skills/thelia3/SKILL.md templates-assets/{theme}/dist symlink listed as a general first-boot trap scoped to back-office Encore themes; the AssetMapper front never reads that path
skills/thelia3/references/front-office.md "Turbo and Mercure: ABSENT from Flexy" — contradicted the file's own header Turbo is imported by assets/app.js, which sets Turbo.session.drive = false; only data-turbo="true" zones navigate client-side
skills/thelia3/references/front-office.md the theme loads its Stimulus Application via @symfony/stimulus-bridge startStimulusApp() from @symfony/stimulus-bundle, in assets/stimulus_bootstrap.js
skills/ddev/SKILL.md, skills/ddev/references/hooks-et-services.md asset-compile hooks running bin/console sass:build and a bare npm run build importmap:install + tailwind:build for the front, the npm build scoped to templates/backOffice/default-twig
skills/fresh-install-test/SKILL.md --backoffice_theme=default while step 6 builds default-twig --backoffice_theme=default-twig, matching the theme the procedure then builds and the reference install command

Plugin version bumped to 0.5.0, following the convention of the previous content PRs.

Correct sequence today

Both commands run from the application root — a theme has no console of its own, the host application is the Thelia app:

php bin/console importmap:install   # front only: downloads the importmap vendors
php bin/console tailwind:build      # front only: compiles assets/styles/app.css
cd templates/backOffice/default-twig && npm install && npm run build

bin/install already runs the two front commands itself when the packages providing them are installed, so a fresh install needs no manual front-office step.

Left to decide

  • The DDEV configuration sample still carries a messenger:consume post-start hook, and Thelia 3 has no Messenger. Out of scope for an asset-stack pass, worth a separate look.
  • No skill documents the production asset step (tailwind:build --minify, asset-map:compile). That is an addition, not a correction, so it is not in this PR.

@anoziere
anoziere merged commit 5ee2b73 into main Aug 18, 2026
2 checks passed
@anoziere
anoziere deleted the docs/align-flexy-stack-with-assetmapper branch August 18, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant