tailwindcss-rails 3.2.0 → 3.3.0

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: bd08ba39cdbf3e583632419190f2918a4eb004ebff05433a43456342ccfece80
4
+ data.tar.gz: 6d393169b40195bebbde219bc1f39d7351a6623f346bd36792b65b24210ad5df
5
5
  SHA512:
6
- metadata.gz: c5450e732306e39d5946b281183607baf68e322bd607310e0084aec8719e916ce378c53c6fe82f0d9959c7bb476511d61daf84a758355b44230e5e75137c9a72
7
- data.tar.gz: 19ef39ff0bbe242e1e2156639bf7e22c67a1d2e86dfab3b0aba74d2365693e72652e74e1ceadab955225fb1edf5b5f5abf8077c63f2013b3f64c9b42f200a877
6
+ metadata.gz: 949b84bfd22f8ff03581c1826026c581601a8659dbfd4d156f62806f9a16ca2ac3a7f3ce816c394d82bd6cf6d9e04029e400a71b73fe1f52cde82e5c122d9f27
7
+ data.tar.gz: 65e70ea1e978c11286993ee62503cb945aa894a1ab0f2f5a156647e68fcbd1c4b0c0732ee31d7e71007cc7147f0f1362398f80fdf7b67eca6794d9925a6e46a9
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.0"
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.0
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-19 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: railties