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 +4 -4
- data/README.md +1 -1
- data/lib/puma/plugin/tailwindcss.rb +6 -2
- data/lib/tailwindcss/commands.rb +6 -4
- data/lib/tailwindcss/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd08ba39cdbf3e583632419190f2918a4eb004ebff05433a43456342ccfece80
|
4
|
+
data.tar.gz: 6d393169b40195bebbde219bc1f39d7351a6623f346bd36792b65b24210ad5df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
15
|
-
IO.
|
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
|
|
data/lib/tailwindcss/commands.rb
CHANGED
@@ -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",
|
10
|
-
"-o",
|
11
|
-
"-c",
|
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 =
|
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
|
data/lib/tailwindcss/version.rb
CHANGED
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.
|
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
|
+
date: 2025-01-19 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: railties
|