-
Notifications
You must be signed in to change notification settings - Fork 174
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
Input/Output paths are hardcoded #438
Comments
Hi @danwetherald, thanks for asking this question. It's nice to meet you.
The contributors to this project have so far solved their problems without needing to introduce configurable paths. Hardcoded paths work fine in a vanilla Rails app. If you have a different problem, that's great, let's talk about it. It's a weird flex to imply that the current implementation doesn't make sense because it doesn't meet your expectations.
Rather than introduce configurable parameters for the commands, it may be more reasonable to use the Tailwindcss CLI directly on a custom Like, if I'm being honest, there isn't much there there in this gem. It's basically:
So I'm suggesting you just run the tailwind command you want with the config file that you need. The tailwindcss-ruby gem should make installation easy in case that's relevant.
This isn't a problem I personally have, so it's unlikely I'm going to do this work. And I'm not sure if the additional complexity is worth it without understanding your use case a bit more deeply. (The additional complexity comes from adding the first configuration option, of which this gem currently has zero.) Also, if you haven't seen it already, there is a long-lived conversation going on at #355 which touches a bit on the config file and the subject of inputs and outputs. It's been hard to make a decision confidently while Tailwind v4 has been under development, but it sounds like a final release is due in the next few weeks, so I expect to pick that thread back up soon. It seems likely some configuration options will be introduced. Feel free to add your voice there if you wish. |
@flavorjones I think that this use case might make sense to make it configurable activeadmin/activeadmin#8223 In our monolith we do something like this, since we have different Tailwind configs for our ActiveAdmin, our Marketing stuff, and our Account stuff. Which can be highly different. So currently we are copy/pasting this ActiveAdmin rake task around for our different applications. |
@henrikbjorn My question to you is the same that I asked above: if you're doing heavy customization already, why not use I'm trying to get a sense for whether |
@flavorjones Makes sense, it is easier to call the tailwind executables directly now with the new ruby gem. My thought was to make it easier for the the compilation to hook into varius rake tests like asset precompilation and the test suite. But that wouldn't change just because the CLI here took additional arguments. tldr; you are correct :) |
Why would it make sense to hardcode and not allow configuration options for the
bin/rails tailwindcss:watch
command?We would like to generate a separate smaller tailwind css file that is for an embedded iframe for example, this should only include the css for a small subset of views for performance reasons.
Any plans to allow for the cli to allow for config params rather than them being hardcoded?
The text was updated successfully, but these errors were encountered: