tailwindcss-rails 2.0.23-arm64-darwin → 2.0.24-arm64-darwin

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87994eddae06bc9764eaee75ff870e4bd3bbc3050b30fd8219291f13b09622b3
4
- data.tar.gz: 5554ef4015f9560b0c797c569a2890bc56b8739f13e50574c8a5349990853b4f
3
+ metadata.gz: b47e9f3064612dff50950fd056219afa826de093ceae7ea2fb0c36ac28aa804c
4
+ data.tar.gz: ea43c28493d1560dc00d50470dfc4e2789f7eb39ec33b16d05d9dcb7c11894fa
5
5
  SHA512:
6
- metadata.gz: 7cb949f154e7b7ec935db5855cf4599f15d6c6d4aa1b4e6816f1b20aa157205bca9bd72d09e47330f0838703e97c073b5d9df4264b07bdc0fe4b503d8a687517
7
- data.tar.gz: 395c09ec74b4ca2d36ade0b1160d25ec27be3a8768f61426125f98bf86e0a8b430c9b3bcff3ef74a83e1860f29890ff966b006b8cd1e940d2489c4be09d0dc71
6
+ metadata.gz: 0cfc401c250cb41e0f35741f9a75876896cb0d9f49501a20e340b4907580350269ab69e4f8b7e46f4ddefc0eb07360de060abb82e38dc137eeedc787d63e0744
7
+ data.tar.gz: 78903a4b090703937be0b5204841d554d558468b02de28bbee87f0d1e5d8e2c3b45d4f10d0833648c3fe6f592fec4b12ceb363a22104f35ba24971a744c1e396
@@ -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: arm64-darwin
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