tailwindcss-rails 3.2.0 → 3.3.1

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: 8ed443928edcf525c0f23ef68477bca7305c5d1f700b0b19e50caa1912aefbcb
4
- data.tar.gz: 1538e3660060124de8677a827a36d1609c3d83e26cd6992f1fc86b9d9c056a1a
3
+ metadata.gz: 186507e50a6eada7491d61e0e6c470d6387181d2ccef0b80595843a269ddaf25
4
+ data.tar.gz: f5953f069070ec00e7c8075f5e46f6abf62530fd5bee8e8f9dfc8a94d9fce7b2
5
5
  SHA512:
6
- metadata.gz: c5450e732306e39d5946b281183607baf68e322bd607310e0084aec8719e916ce378c53c6fe82f0d9959c7bb476511d61daf84a758355b44230e5e75137c9a72
7
- data.tar.gz: 19ef39ff0bbe242e1e2156639bf7e22c67a1d2e86dfab3b0aba74d2365693e72652e74e1ceadab955225fb1edf5b5f5abf8077c63f2013b3f64c9b42f200a877
6
+ metadata.gz: ac1d7fdee37272a7edcacf074114dce4097130c72f6e20f609e2cd7ea17a941d3a1c0b8fa0af04244cb92329fc61854784af79fd1cf6b20dd0904cd07b3408ca
7
+ data.tar.gz: 417eb6b2e70f26192adb46b619448e0b5ed7d556b6ecfa01cd5fc464a046e1910e7913f2626ec710d19d7b2359e288a6a46ea2ab466468da54e30e5fa9fb9896
data/README.md CHANGED
@@ -124,7 +124,7 @@ This gem ships with a Puma plugin. To use it, add this line to your `puma.rb` co
124
124
  plugin :tailwindcss if ENV.fetch("RAILS_ENV", "development") == "development"
125
125
  ```
126
126
 
127
- and then running `rails server` will run the Tailwind watch process in the background
127
+ and then running `rails server` (or just `puma`) will run the Tailwind watch process in the background.
128
128
 
129
129
 
130
130
  #### Run `rails tailwindcss:watch`
@@ -1,4 +1,5 @@
1
1
  require "puma/plugin"
2
+ require "tailwindcss/commands"
2
3
 
3
4
  Puma::Plugin.create do
4
5
  attr_reader :puma_pid, :tailwind_pid, :log_writer
@@ -11,8 +12,11 @@ Puma::Plugin.create do
11
12
  # Using IO.popen(command, 'r+') will avoid watch_command read from $stdin.
12
13
  # If we use system(*command) instead, IRB and Debug can't read from $stdin
13
14
  # correctly bacause some keystrokes will be taken by watch_command.
14
- IO.popen(Tailwindcss::Commands.watch_command, 'r+') do |io|
15
- IO.copy_stream(io, $stdout)
15
+ begin
16
+ IO.popen(Tailwindcss::Commands.watch_command, 'r+') do |io|
17
+ IO.copy_stream(io, $stdout)
18
+ end
19
+ rescue Interrupt
16
20
  end
17
21
  end
18
22
 
@@ -4,16 +4,18 @@ module Tailwindcss
4
4
  module Commands
5
5
  class << self
6
6
  def compile_command(debug: false, **kwargs)
7
+ rails_root = defined?(Rails) ? Rails.root : Pathname.new(Dir.pwd)
8
+
7
9
  command = [
8
10
  Tailwindcss::Ruby.executable(**kwargs),
9
- "-i", Rails.root.join("app/assets/stylesheets/application.tailwind.css").to_s,
10
- "-o", Rails.root.join("app/assets/builds/tailwind.css").to_s,
11
- "-c", Rails.root.join("config/tailwind.config.js").to_s,
11
+ "-i", rails_root.join("app/assets/stylesheets/application.tailwind.css").to_s,
12
+ "-o", rails_root.join("app/assets/builds/tailwind.css").to_s,
13
+ "-c", rails_root.join("config/tailwind.config.js").to_s,
12
14
  ]
13
15
 
14
16
  command << "--minify" unless (debug || rails_css_compressor?)
15
17
 
16
- postcss_path = Rails.root.join("config/postcss.config.js")
18
+ postcss_path = rails_root.join("config/postcss.config.js")
17
19
  command += ["--postcss", postcss_path.to_s] if File.exist?(postcss_path)
18
20
 
19
21
  command
@@ -1,3 +1,3 @@
1
1
  module Tailwindcss
2
- VERSION = "3.2.0"
2
+ VERSION = "3.3.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwindcss-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-10 00:00:00.000000000 Z
10
+ date: 2025-01-23 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: railties
@@ -27,16 +27,16 @@ dependencies:
27
27
  name: tailwindcss-ruby
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - ">="
30
+ - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '0'
32
+ version: '3.0'
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
37
+ - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0'
39
+ version: '3.0'
40
40
  email: david@loudthinking.com
41
41
  executables: []
42
42
  extensions: []