-
Notifications
You must be signed in to change notification settings - Fork 185
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
Introduce a 'tailwindcss:upgrade' task #466
Conversation
9e3edc7
to
65ad81c
Compare
As I mentioned in #450 , the update tool assumes And I noticed this line wasn't changed
Maybe we should change the update task to also move the postcss config file to the root path change the previous line to postcss_path = rails_root.join("postcss.config.js") And update the documentation related to postcss to reflect accordingly. What do you think about this approach? Are there any potential drawbacks or edge cases I might have missed? |
- rename install/tailwindcss.rb to install/install_tailwindcss.rb - new script install/upgrade_tailwindcss.rb which: - removes the "inter-font" CSS tag from the application layout - comments out references to 'defaultTheme' in tailwind.config.js - runs "npx @tailwindcss/upgrade@next" if npx is available - new integration test
65ad81c
to
25010f3
Compare
@EricGusmao good catch. I'll add that to this PR. |
This is where the tailwind upgrade tool expects it to be, because that's the convention, apparently.
@EricGusmao added a commit to handle the postcss file. |
@flavorjones There’s one aspect that still concerns me a bit. If the user isn’t using PostCSS, some migrations (e.g., updating class names in the view files) will fail. Additionally, in setups without JavaScript tooling, the update process may fail to fully migrate Do you think it’s worth addressing these scenarios? |
@EricGusmao If I knew how to address those scenarios, I might be willing to try. But I think there is a limit to how much we can reasonably automate, and the users will have to do some manual work. In other words, I think this is "close enough to ship", and we can continue to make the upgrade task better if we figure out ways to address edge cases like the ones you're mentioning. Is that a reasonable response? |
@flavorjones Yes, I completely agree. |
Child of #462