Overview
The CLI tool needs to be able to transpile the CSS code of local components. This is referring to individual CSS written for each component.
→ See: #3525571: [Meta] CLI tool for code components
Proposed resolution
- Implement this command using Lightning CSS with the same configuration as Tailwind CSS and
tailwindcss-in-browswer: https://github.com/tailwindlabs/tailwindcss/blob/v4.1.4/packages/%40tail.... - Read the location for your local directory for components from an environment variable or
.envfile established in #3525579: Implement client credentials flow in CLI, centralize managing config. - Allow users to select components interactively or passed as a CLI argument. Make sure there is an option to select all.
- Write the output to
dist/index.cssinside the directory of every component. - Extend the upload command (#3525587: CLI command to upload code components) to run this compilation, and upload the compiled CSS for the component(s).
Issue fork experience_builder-3525590
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3525590-cli-command-to
changes, plain diff MR !1182
Comments
Comment #2
balintbrewsComment #3
balintbrewsPlaceholder already added in
cli/src/utils/build.ts.Comment #4
hooroomooComment #6
hooroomooAdding credit for bug fix
Comment #7
hooroomooComment #8
balintbrewsComment #9
hooroomooThis will be a part of #3525592: CLI command to build Tailwind CSS for code components's MR.