tailwindcss-rails 2.0.13-arm64-darwin → 2.0.24-arm64-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -2
- data/exe/arm64-darwin/tailwindcss +0 -0
- data/lib/generators/tailwindcss/scaffold/scaffold_generator.rb +2 -2
- data/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt +6 -6
- data/lib/install/dev +3 -4
- data/lib/tailwindcss/commands.rb +7 -3
- data/lib/tailwindcss/upstream.rb +2 -1
- data/lib/tailwindcss/version.rb +1 -1
- data/lib/tasks/build.rake +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b47e9f3064612dff50950fd056219afa826de093ceae7ea2fb0c36ac28aa804c
|
4
|
+
data.tar.gz: ea43c28493d1560dc00d50470dfc4e2789f7eb39ec33b16d05d9dcb7c11894fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cfc401c250cb41e0f35741f9a75876896cb0d9f49501a20e340b4907580350269ab69e4f8b7e46f4ddefc0eb07360de060abb82e38dc137eeedc787d63e0744
|
7
|
+
data.tar.gz: 78903a4b090703937be0b5204841d554d558468b02de28bbee87f0d1e5d8e2c3b45d4f10d0833648c3fe6f592fec4b12ceb363a22104f35ba24971a744c1e396
|
data/README.md
CHANGED
@@ -28,8 +28,13 @@ The `tailwindcss:build` is automatically attached to `assets:precompile`, so bef
|
|
28
28
|
|
29
29
|
### Building for testing
|
30
30
|
|
31
|
-
The `tailwindcss:build` is automatically attached to `test:prepare
|
31
|
+
The `tailwindcss:build` task is automatically attached to the `test:prepare` Rake task. The `test:prepare` task is run before some test tasks (e.g. `test:all` and `test:controllers`), but not before the bare `test` task.
|
32
32
|
|
33
|
+
If your tests need Tailwind assets in your CI environment, it's best to be explicit and run this command:
|
34
|
+
|
35
|
+
```
|
36
|
+
bin/rails test:prepare test
|
37
|
+
```
|
33
38
|
|
34
39
|
### Update assets automatically
|
35
40
|
|
@@ -65,7 +70,7 @@ Tailwind uses modern CSS features that are not recognized by the `sassc-rails` e
|
|
65
70
|
|
66
71
|
### Class names must be spelled out
|
67
72
|
|
68
|
-
For Tailwind to work, your class names need to be spelled out.
|
73
|
+
For Tailwind to work, your class names need to be spelled out. If you need to make sure Tailwind generates class names that don't exist in your content files or that are programmatically composed, use the [safelist option](https://tailwindcss.com/docs/content-configuration#safelisting-classes).
|
69
74
|
|
70
75
|
### ERROR: Cannot find the tailwindcss executable for <supported platform>
|
71
76
|
|
Binary file
|
@@ -22,7 +22,7 @@ module Tailwindcss
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
template "partial.html.erb", File.join("app/views", controller_file_path, "_#{
|
25
|
+
template "partial.html.erb", File.join("app/views", controller_file_path, "_#{singular_name}.html.erb")
|
26
26
|
end
|
27
27
|
|
28
28
|
private
|
@@ -31,4 +31,4 @@ module Tailwindcss
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
34
|
-
end
|
34
|
+
end
|
@@ -1,22 +1,22 @@
|
|
1
|
-
<div id="<%%= dom_id <%=
|
1
|
+
<div id="<%%= dom_id <%= singular_name %> %>">
|
2
2
|
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
3
3
|
<p class="my-5">
|
4
4
|
<strong class="block font-medium mb-1"><%= attribute.human_name %>:</strong>
|
5
5
|
<% if attribute.attachment? -%>
|
6
|
-
<%%= link_to <%=
|
6
|
+
<%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %> if <%= singular_name %>.<%= attribute.column_name %>.attached? %>
|
7
7
|
<% elsif attribute.attachments? -%>
|
8
|
-
<%% <%=
|
8
|
+
<%% <%= singular_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
|
9
9
|
<div><%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %></div>
|
10
10
|
<%% end %>
|
11
11
|
<% else -%>
|
12
|
-
<%%= <%=
|
12
|
+
<%%= <%= singular_name %>.<%= attribute.column_name %> %>
|
13
13
|
<% end -%>
|
14
14
|
</p>
|
15
15
|
|
16
16
|
<% end -%>
|
17
17
|
<%% if action_name != "show" %>
|
18
|
-
<%%= link_to "Show this <%= human_name.downcase %>", <%=
|
19
|
-
<%%= link_to 'Edit this <%= human_name.downcase %>', edit_<%=
|
18
|
+
<%%= link_to "Show this <%= human_name.downcase %>", <%= singular_name %>, class: "rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
19
|
+
<%%= link_to 'Edit this <%= human_name.downcase %>', edit_<%= singular_name %>_path(<%= singular_name %>), class: "rounded-lg py-3 ml-2 px-5 bg-gray-100 inline-block font-medium" %>
|
20
20
|
<hr class="mt-6">
|
21
21
|
<%% end %>
|
22
22
|
</div>
|
data/lib/install/dev
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
#!/usr/bin/env
|
1
|
+
#!/usr/bin/env sh
|
2
2
|
|
3
|
-
if !
|
4
|
-
then
|
3
|
+
if ! gem list foreman -i --silent; then
|
5
4
|
echo "Installing foreman..."
|
6
5
|
gem install foreman
|
7
6
|
fi
|
8
7
|
|
9
|
-
foreman start -f Procfile.dev
|
8
|
+
exec foreman start -f Procfile.dev "$@"
|
data/lib/tailwindcss/commands.rb
CHANGED
@@ -18,7 +18,7 @@ module Tailwindcss
|
|
18
18
|
def executable(
|
19
19
|
exe_path: File.expand_path(File.join(__dir__, "..", "..", "exe"))
|
20
20
|
)
|
21
|
-
if Tailwindcss::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match(p) }
|
21
|
+
if Tailwindcss::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match(Gem::Platform.new(p)) }
|
22
22
|
raise UnsupportedPlatformException, <<~MESSAGE
|
23
23
|
tailwindcss-rails does not support the #{platform} platform
|
24
24
|
Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation
|
@@ -26,7 +26,7 @@ module Tailwindcss
|
|
26
26
|
end
|
27
27
|
|
28
28
|
exe_path = Dir.glob(File.expand_path(File.join(exe_path, "*", "tailwindcss"))).find do |f|
|
29
|
-
Gem::Platform.match(File.basename(File.dirname(f)))
|
29
|
+
Gem::Platform.match(Gem::Platform.new(File.basename(File.dirname(f))))
|
30
30
|
end
|
31
31
|
|
32
32
|
if exe_path.nil?
|
@@ -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
|
data/lib/tailwindcss/upstream.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Tailwindcss
|
2
2
|
# constants describing the upstream tailwindcss project
|
3
3
|
module Upstream
|
4
|
-
VERSION = "v3.
|
4
|
+
VERSION = "v3.2.7"
|
5
5
|
|
6
6
|
# rubygems platform name => upstream release filename
|
7
7
|
NATIVE_PLATFORMS = {
|
@@ -11,6 +11,7 @@ module Tailwindcss
|
|
11
11
|
"x86_64-darwin" => "tailwindcss-macos-x64",
|
12
12
|
"x86_64-linux" => "tailwindcss-linux-x64",
|
13
13
|
"aarch64-linux" => "tailwindcss-linux-arm64",
|
14
|
+
"arm-linux" => "tailwindcss-linux-armv7",
|
14
15
|
}
|
15
16
|
end
|
16
17
|
end
|
data/lib/tailwindcss/version.rb
CHANGED
data/lib/tasks/build.rake
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
namespace :tailwindcss do
|
2
2
|
desc "Build your Tailwind CSS"
|
3
|
-
task :
|
3
|
+
task build: :environment do |_, args|
|
4
4
|
debug = args.extras.include?("debug")
|
5
5
|
command = Tailwindcss::Commands.compile_command(debug: debug)
|
6
|
-
puts command.inspect
|
6
|
+
puts command.inspect if args.extras.include?("verbose")
|
7
7
|
system(*command, exception: true)
|
8
8
|
end
|
9
9
|
|
10
10
|
desc "Watch and build your Tailwind CSS on file changes"
|
11
|
-
task :
|
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)
|
15
|
-
puts command.inspect
|
15
|
+
puts command.inspect if args.extras.include?("verbose")
|
16
16
|
system(*command)
|
17
17
|
end
|
18
18
|
end
|
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.
|
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:
|
11
|
+
date: 2023-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
|
-
rubygems_version: 3.
|
103
|
+
rubygems_version: 3.4.1
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Integrate Tailwind CSS with the asset pipeline in Rails.
|