-
Notifications
You must be signed in to change notification settings - Fork 189
Remove setting of tailwindcss as the default template_engine #131
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
Conversation
This will break the scaffolding afaik, if we remove the template_engine we'll not get tailwind custom scaffold templates. This is done in order to override the default rails scaffolds https://github.com/rails/tailwindcss-rails/tree/main/lib/generators/tailwindcss. I'm 100% up for removing the Do tailwind scaffolds work for you if you remove this configuration? |
Thanks for the insights. I'll check properly if the scaffolds work with the configuration removed. |
@dixpac turns out none of the scaffolds will include the tailwind custom styling with my change. This may be a good thing as this no longer forces it on all users. |
Thanks @davidteren I don't think this is the direction we wan't to go with, since our main idea with the tailwind generators was to override default rails generators so we don't have to provide @dhh has the last word on this, but the initial idea was just to use |
Yup! |
FWIW, this breaks the I didn't expect including the |
Feel free to explore ways where all this can coexist. But yes, with the tailwind gem installed, scaffolds should be generated with TW styling. Maybe we can detect if another, non-default template handler has already been registered, and then warn/abort, though. |
Not sure why we set
g.template_engine :tailwindcss
it is not a typical template engine likeerb, haml, slim
and others.One adverse effect of setting it to
tailwindcss
is RSpec view generators will not use the correct template name.Eg:
spec/views/home/index.html.tailwindcss_spec.rb
where it should bespec/views/home/index.html.erb.rb
Removing the config resolves the above issue.