tailwindcss-rails 2.0.23-x86_64-linux → 2.0.24-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6042de09ce7b36898dd6590515a13e811d7df1ec02ed7b2b933d8b1b9ead81e4
4
- data.tar.gz: e4799814e5592422da092153a2067f58a0476132440ef96c898f1de070135282
3
+ metadata.gz: 6e795972234926c2c2daf9f50e949ccb1c0923594ea9e72e987fbf7973ce9b73
4
+ data.tar.gz: e7e6197a0453e3ffc3997dc80ba3e14baa6bd44c0480f252accc0c8da5e20b62
5
5
  SHA512:
6
- metadata.gz: cbf1a83713050a4ccea63367e862f2c156aaa8e5b0ea94ca9b95002a15dda35aed05bbe8f0cb4ed01aaf088372715b59ff7c90ccbd8c7f741cb25a0363aca2c7
7
- data.tar.gz: 733eb53f32fb429af63670d67bc64a9d8ee9e62518dd993507f6b14766f19a566fe75cbc2e95aa2e54d07105fa2f1ef907cb86beda89fc0afdf0092f7adc3c77
6
+ metadata.gz: 83c03273ecb870827270a6afca7e6ee996a56e0aebb12f57979314db990e94808dda213d949f35499976871a61ddb8d016f4642b9ea178e34d0ba7bb27a413b5
7
+ data.tar.gz: 390fbb424ac24d1cd254baf22666175ec4dbe6ac67bb15a49a123dc988c1570f5e2993dfae16b240ac882679ae57881a04c8b90aba89194f5977e99f99f77c8d
@@ -62,7 +62,7 @@ module Tailwindcss
62
62
  "-o", Rails.root.join("app/assets/builds/tailwind.css").to_s,
63
63
  "-c", Rails.root.join("config/tailwind.config.js").to_s,
64
64
  ].tap do |command|
65
- command << "--minify" unless debug
65
+ command << "--minify" unless (debug || rails_css_compressor?)
66
66
  end
67
67
  end
68
68
 
@@ -72,6 +72,10 @@ module Tailwindcss
72
72
  command << "-p" if poll
73
73
  end
74
74
  end
75
+
76
+ def rails_css_compressor?
77
+ defined?(Rails) && Rails&.application&.config&.assets&.css_compressor.present?
78
+ end
75
79
  end
76
80
  end
77
81
  end
@@ -1,3 +1,3 @@
1
1
  module Tailwindcss
2
- VERSION = "2.0.23"
2
+ VERSION = "2.0.24"
3
3
  end
data/lib/tasks/build.rake CHANGED
@@ -1,6 +1,6 @@
1
1
  namespace :tailwindcss do
2
2
  desc "Build your Tailwind CSS"
3
- task :build do |_, args|
3
+ task build: :environment do |_, args|
4
4
  debug = args.extras.include?("debug")
5
5
  command = Tailwindcss::Commands.compile_command(debug: debug)
6
6
  puts command.inspect if args.extras.include?("verbose")
@@ -8,7 +8,7 @@ namespace :tailwindcss do
8
8
  end
9
9
 
10
10
  desc "Watch and build your Tailwind CSS on file changes"
11
- task :watch do |_, args|
11
+ task watch: :environment do |_, args|
12
12
  debug = args.extras.include?("debug")
13
13
  poll = args.extras.include?("poll")
14
14
  command = Tailwindcss::Commands.watch_command(debug: debug, poll: poll)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwindcss-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.23
4
+ version: 2.0.24
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-19 00:00:00.000000000 Z
11
+ date: 2023-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties