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 +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 +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 186507e50a6eada7491d61e0e6c470d6387181d2ccef0b80595843a269ddaf25
|
4
|
+
data.tar.gz: f5953f069070ec00e7c8075f5e46f6abf62530fd5bee8e8f9dfc8a94d9fce7b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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.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
|
+
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: []
|