From fb10d2c113ef8fc298d7639e4c96739952374d78 Mon Sep 17 00:00:00 2001 From: Gannon McGibbon Date: Sun, 8 Aug 2021 02:27:41 -0400 Subject: [PATCH 1/2] Update lockfile --- Gemfile.lock | 144 +++++++++++++++++++++++++-------------------------- 1 file changed, 71 insertions(+), 73 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 423f2ac6..c5c78897 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,60 +7,60 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (6.1.1) - actionpack (= 6.1.1) - activesupport (= 6.1.1) + actioncable (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.1) - actionpack (= 6.1.1) - activejob (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) + actionmailbox (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) mail (>= 2.7.1) - actionmailer (6.1.1) - actionpack (= 6.1.1) - actionview (= 6.1.1) - activejob (= 6.1.1) - activesupport (= 6.1.1) + actionmailer (6.1.4) + actionpack (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activesupport (= 6.1.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.1) - actionview (= 6.1.1) - activesupport (= 6.1.1) + actionpack (6.1.4) + actionview (= 6.1.4) + activesupport (= 6.1.4) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.1) - actionpack (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) + actiontext (6.1.4) + actionpack (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) nokogiri (>= 1.8.5) - actionview (6.1.1) - activesupport (= 6.1.1) + actionview (6.1.4) + activesupport (= 6.1.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.1.1) - activesupport (= 6.1.1) + activejob (6.1.4) + activesupport (= 6.1.4) globalid (>= 0.3.6) - activemodel (6.1.1) - activesupport (= 6.1.1) - activerecord (6.1.1) - activemodel (= 6.1.1) - activesupport (= 6.1.1) - activestorage (6.1.1) - actionpack (= 6.1.1) - activejob (= 6.1.1) - activerecord (= 6.1.1) - activesupport (= 6.1.1) - marcel (~> 0.3.1) - mimemagic (~> 0.3.2) - activesupport (6.1.1) + activemodel (6.1.4) + activesupport (= 6.1.4) + activerecord (6.1.4) + activemodel (= 6.1.4) + activesupport (= 6.1.4) + activestorage (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activesupport (= 6.1.4) + marcel (~> 1.0.0) + mini_mime (>= 1.1.0) + activesupport (6.1.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -68,60 +68,58 @@ GEM zeitwerk (~> 2.3) builder (3.2.4) byebug (11.1.3) - concurrent-ruby (1.1.8) + concurrent-ruby (1.1.9) crass (1.0.6) erubi (1.10.0) - globalid (0.4.2) - activesupport (>= 4.2.0) - i18n (1.8.8) + globalid (0.5.2) + activesupport (>= 5.0) + i18n (1.8.10) concurrent-ruby (~> 1.0) - loofah (2.9.0) + loofah (2.11.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) + marcel (1.0.1) method_source (1.0.0) - mimemagic (0.3.5) - mini_mime (1.0.2) - mini_portile2 (2.5.0) - minitest (5.14.3) - nio4r (2.5.5) - nokogiri (1.11.1) - mini_portile2 (~> 2.5.0) + mini_mime (1.1.0) + mini_portile2 (2.6.1) + minitest (5.14.4) + nio4r (2.5.8) + nokogiri (1.12.2) + mini_portile2 (~> 2.6.1) racc (~> 1.4) racc (1.5.2) rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.1) - actioncable (= 6.1.1) - actionmailbox (= 6.1.1) - actionmailer (= 6.1.1) - actionpack (= 6.1.1) - actiontext (= 6.1.1) - actionview (= 6.1.1) - activejob (= 6.1.1) - activemodel (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) + rails (6.1.4) + actioncable (= 6.1.4) + actionmailbox (= 6.1.4) + actionmailer (= 6.1.4) + actionpack (= 6.1.4) + actiontext (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activemodel (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) bundler (>= 1.15.0) - railties (= 6.1.1) + railties (= 6.1.4) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.1.1) - actionpack (= 6.1.1) - activesupport (= 6.1.1) + railties (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) method_source - rake (>= 0.8.7) + rake (>= 0.13) thor (~> 1.0) - rake (13.0.3) + rake (13.0.6) sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -133,7 +131,7 @@ GEM thor (1.1.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) - websocket-driver (0.7.3) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) zeitwerk (2.4.2) @@ -147,4 +145,4 @@ DEPENDENCIES tailwindcss-rails! BUNDLED WITH - 2.1.4 + 2.2.3 From 0799610f37cddaaa3d17e379d30536588965e333 Mon Sep 17 00:00:00 2001 From: Gannon McGibbon Date: Sun, 8 Aug 2021 02:28:05 -0400 Subject: [PATCH 2/2] Skip sprockets initializers for apps that don't use sprockets --- lib/tailwindcss/engine.rb | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/tailwindcss/engine.rb b/lib/tailwindcss/engine.rb index d46f5850..1191157e 100644 --- a/lib/tailwindcss/engine.rb +++ b/lib/tailwindcss/engine.rb @@ -2,22 +2,24 @@ module Tailwindcss class Engine < ::Rails::Engine - initializer "tailwindcss.compressor" do - Sprockets.register_compressor "text/css", :purger, Tailwindcss::Compressor - end + if defined?(Sprockets) + initializer "tailwindcss.compressor" do + Sprockets.register_compressor "text/css", :purger, Tailwindcss::Compressor + end - initializer "tailwindcss.assets" do - Rails.application.config.assets.precompile += %w( tailwind.css inter-font.css ) - end + initializer "tailwindcss.assets" do + Rails.application.config.assets.precompile += %w( tailwind.css inter-font.css ) + end - initializer "tailwindcss.disable_generator_stylesheets" do - Rails.application.config.generators.stylesheets = false - end + initializer "tailwindcss.disable_generator_stylesheets" do + Rails.application.config.generators.stylesheets = false + end - initializer "tailwindcss.disable_assets_cache" do - Rails.application.config.assets.configure do |env| - env.cache = ActiveSupport::Cache.lookup_store(:null_store) - end if Rails.env.production? + initializer "tailwindcss.disable_assets_cache" do + Rails.application.config.assets.configure do |env| + env.cache = ActiveSupport::Cache.lookup_store(:null_store) + end if Rails.env.production? + end end end end