Skip to content

Commit aeae1a9

Browse files
author
David Heinemeier Hansson
committed
Rails 7 won't have this by default, so decrease the noise
1 parent a742f39 commit aeae1a9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/install/tailwindcss.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
say %( Add <%= stylesheet_link_tag "inter-font", "data-turbo-track": "reload" %> and <%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %> within the <head> tag in your custom layout.)
99
end
1010

11-
say "Removing scaffold styles"
12-
remove_file Rails.root.join("app/assets/stylesheets/scaffolds.scss")
11+
# No longer included by default in Rails 7, but for earlier versions of Rails
12+
if (scaffolds_css_path = Rails.root.join("app/assets/stylesheets/scaffolds.scss")).exist?
13+
remove_file scaffolds_css_path
14+
end
1315

1416
say "Turn on purging of unused css classes in production"
1517
gsub_file Rails.root.join("config/environments/production.rb"), /^\s+#?\s+config.assets.css_compressor =.*$/, %( config.assets.css_compressor = :purger)

0 commit comments

Comments
 (0)