add tailwind (oh the hopeful, they live in bliss)

This commit is contained in:
Torsten 2022-11-21 12:52:39 +02:00
parent 91e46684f1
commit cfb096f5d1
5 changed files with 31 additions and 4 deletions

View File

@ -55,3 +55,5 @@ gem "jsbundling-rails", "~> 1.0"
gem "cssbundling-rails", "~> 1.1"
gem "importmap-rails", "~> 1.1"
gem "tailwindcss-rails", "~> 2.0"

View File

@ -274,6 +274,8 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
tailwindcss-rails (2.0.21-x86_64-linux)
railties (>= 6.0.0)
temple (0.9.1)
thor (1.2.1)
tilt (2.0.11)
@ -327,6 +329,7 @@ DEPENDENCIES
sassc-rails
selenium-webdriver
sprockets-rails
tailwindcss-rails (~> 2.0)
web-console
webdrivers
whenever

View File

@ -1,3 +1,4 @@
web: bin/rails server -p 3000
js: yarn build --watch
css: yarn build:css --watch
css: bin/rails tailwindcss:watch

View File

@ -1,9 +1,8 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
if ! command -v foreman &> /dev/null
then
if ! gem list foreman -i --silent; then
echo "Installing foreman..."
gem install foreman
fi
foreman start -f Procfile.dev "$@"
exec foreman start -f Procfile.dev "$@"

22
config/tailwind.config.js Normal file
View File

@ -0,0 +1,22 @@
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'),
]
}