File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ def tailwindcss_version
1010 def compile_command ( debug : false , **kwargs )
1111 command = [
1212 Tailwindcss ::Ruby . executable ( **kwargs ) ,
13- "-o" , Rails . root . join ( "app/assets/builds/tailwind.css" ) . to_s
13+ "-o" , Rails . root . join ( "app/assets/builds/tailwind.css" ) . to_s ,
14+ "-i" , Rails . root . join ( "app/assets/stylesheets/application.tailwind.css" ) . to_s ,
1415 ]
1516
1617 unless tailwindcss_version >= "4.0"
1718 command += [
18- "-i" , Rails . root . join ( "app/assets/stylesheets/application.tailwind.css" ) . to_s ,
1919 "-c" , Rails . root . join ( "config/tailwind.config.js" ) . to_s ,
2020 ]
2121 end
Original file line number Diff line number Diff line change @@ -32,6 +32,12 @@ bundle install
3232bundle show --paths
3333bundle binstubs --all
3434
35+ if bundle show | fgrep tailwindcss-ruby | fgrep -q " (4." ; then
36+ TAILWIND4=1
37+ else
38+ TAILWIND4=0
39+ fi
40+
3541# install tailwindcss
3642bin/rails tailwindcss:install
3743
@@ -45,6 +51,13 @@ task :still_here do
4551end
4652EOF
4753
54+ if [[ $TAILWIND4 = 1 ]] ; then
55+ cat > app/assets/stylesheets/application.tailwind.css << EOF
56+ @import "tailwindcss";
57+ @theme { --color-special: #abc12399; }
58+ EOF
59+ fi
60+
4861bin/rails tailwindcss:build still_here | grep " Rake process did not exit early"
4962
5063if [[ $( rails -v) > " Rails 8.0.0.beta" ]] ; then
@@ -61,4 +74,9 @@ grep -q "Show this post" app/views/posts/index.html.erb
6174bin/rails tailwindcss:build[verbose]
6275grep -q " py-2" app/assets/builds/tailwind.css
6376
77+ if [[ $TAILWIND4 = 1 ]] ; then
78+ # TEST: contents include application.tailwind.css
79+ grep -q " #abc12399" app/assets/builds/tailwind.css
80+ fi
81+
6482echo " OK"
You can’t perform that action at this time.
0 commit comments