Open matt17r opened 2 years ago
I would say this a concern from the tailwind gem rather than haml. If Haml starts supporting external libraries specifics in their own code, they would have to be actively mainting it and effectively depend in third parties, which is never a good thing I would say
Hi, I am new to Rails 7. When installing hail-rails on a bootstrap app
rails new app --css bootstrap
the generators create haml files accordingly; however, when using the tailwind option:
rails new app --css tailwind
The generators create html.erb files, and I have to manually convert them.
@matt17r looking at your comment, I attempted to do the same; however my tailwind.config.js
differs from your example:
const defaultTheme = require('tailwindcss/defaultTheme')
module.exports = {
content: [
'./public/*.html',
'./app/helpers/**/*.rb',
'./app/javascript/**/*.js',
'./app/views/**/*.{erb,haml,html,slim}'
],
theme: {
extend: {
fontFamily: {
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
},
},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/aspect-ratio'),
require('@tailwindcss/typography'),
]
Any pointers on this would be much appreciated, regards.
Jaime
I had to manually add the following line to
tailwind.config.js
in a rails 7 app using haml-rails to get the JIT compiler to work.Is it worth including that in the install script? If so, do you want me to try my hand at a PR?