SymfonyCasts / tailwind-bundle

Delightful Tailwind Support for Symfony + AssetMapper
https://symfony.com/bundles/TailwindBundle/current/index.html
MIT License
84 stars 20 forks source link

Allow working with multiple entrypoints #58

Closed adeys closed 4 months ago

adeys commented 6 months ago

This PR proposes a fix for issues #45 and #46, addressing the need to pass multiple entrypoints as an array to the tailwind builder.

symfonycasts_tailwind:
    input_css:
        - '%kernel.project_dir%/assets/styles/index.css'
        - '%kernel.project_dir%/assets/styles/custom.css'

With this enhancement, users can now specify multiple entrypoints by providing an array of file paths. When building, the entrypoint name should be passed to the command. If omitted, it defaults to the first entrypoint specified in the configuration.

This change enables the following behavior:

Additionally, the default tailwind.built.css file is no longer generated. Instead, each entrypoint is compiled to a file named based on the original entrypoint name. For example, index.built.css for index.css and custom.built.css for custom.css.

For BC compatibility, the input_css still accepts a string value and requires no changes from the developer

Feedback and improvement ideas are welcomed. Thank you!

barbieswimcrew commented 5 months ago

This looks good to me.

I will wait a bit, maybe someone else will leave feedback here

I would welcome it if this would finally being merged 🥇

bocharsky-bw commented 4 months ago

@adeys Thank you for working on it!