Align the front-office asset stack on AssetMapper and Tailwind CLI - #6
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, adist/served throughtemplates-assets/.After (front office, Flexy): AssetMapper (
importmap.php, vendors downloaded into a git-ignoredassets/vendor/), Tailwind v4 compiled bysymfonycasts/tailwind-bundlefromassets/styles/app.css(CSS-first, no JS config), Stimulus started bystartStimulusApp()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 build—default-twigstill ships apackage.jsonand awebpack.config.jswriting totemplates-assets/backOffice/{theme}/dist. Every npm instruction left in the plugin targets that theme only.What is corrected
skills/thelia3/SKILL.mdskills/thelia3/SKILL.mdtemplates-assets/{theme}/distsymlink listed as a general first-boot trapskills/thelia3/references/front-office.mdassets/app.js, which setsTurbo.session.drive = false; onlydata-turbo="true"zones navigate client-sideskills/thelia3/references/front-office.mdApplicationvia@symfony/stimulus-bridgestartStimulusApp()from@symfony/stimulus-bundle, inassets/stimulus_bootstrap.jsskills/ddev/SKILL.md,skills/ddev/references/hooks-et-services.mdbin/console sass:buildand a barenpm run buildimportmap:install+tailwind:buildfor the front, the npm build scoped totemplates/backOffice/default-twigskills/fresh-install-test/SKILL.md--backoffice_theme=defaultwhile step 6 buildsdefault-twig--backoffice_theme=default-twig, matching the theme the procedure then builds and the reference install commandPlugin 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:
bin/installalready 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
messenger:consumepost-start hook, and Thelia 3 has no Messenger. Out of scope for an asset-stack pass, worth a separate look.tailwind:build --minify,asset-map:compile). That is an addition, not a correction, so it is not in this PR.