Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage multiple outputs depending on the input #63

Open
maximehuran opened this issue Aug 20, 2024 · 2 comments
Open

Manage multiple outputs depending on the input #63

maximehuran opened this issue Aug 20, 2024 · 2 comments

Comments

@maximehuran
Copy link

maximehuran commented Aug 20, 2024

I am using the multiple CSS entries and it is very nice.
I am compiling multiples themes and their input file are always app.css but in different folders.

I think it could be great to use the folder of the input in the output file :

https://github.com/SymfonyCasts/tailwind-bundle/blob/main/src/TailwindBuilder.php#L113

Maybe with a hash or using the %kernel.project_dir%/folder/to/the/file/app.css to folder-to-the-file-app.css

Or give the outpile file in the configuration for each entry

@bocharsky-bw
Copy link
Member

Could you elaborate on it a bit more? What is your initial reason for having multiple output files? Do you want to include those different output files in different spots? Something else?

IMO it might be too minor because with proper caching you still may use the same file, and in some cases, it might be even better because of the cache instead of including multiple files.

Also, if having different output files for different input files may confuse some users who want to use different input files and compile everything in the 1 output file for simplicity.

Or give the outpile file in the configuration for each entry

Specifying an output file name for each input file may be too verbose and would complicate the configuration. IMO, the best solution would be to have a boolean config option, something like multiple_output_css: true that will be false by default. Though it still may be confusing.

But I'm not sure how many people would need it, probably if it's an edge case - better to override some internal files in your project and implement something like this in your specific app.

@maximehuran
Copy link
Author

I am in a Sylius app with many themes.
For now I managed my case with that change :

image

It's dirty but I will be able to improve that if the bundle is more flexible on that.

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

No branches or pull requests

2 participants