tailwindcss-rails 0.5.0 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/Rakefile +1 -0
- data/app/assets/stylesheets/tailwind.css +1 -1
- data/lib/generators/tailwindcss/controller/controller_generator.rb +9 -0
- data/lib/generators/tailwindcss/controller/templates/view.html.erb.tt +4 -0
- data/lib/generators/tailwindcss/mailer/mailer_generator.rb +9 -0
- data/lib/generators/tailwindcss/mailer/templates/view.html.erb.tt +5 -0
- data/lib/generators/tailwindcss/mailer/templates/view.text.erb.tt +3 -0
- data/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt +1 -1
- data/lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt +1 -1
- data/lib/tailwindcss/compressor.rb +9 -2
- data/lib/tailwindcss/engine.rb +1 -0
- data/lib/tailwindcss/version.rb +1 -1
- metadata +9 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 034611e8ea49f35f8fb1f8c04e2a838011cf60f0a3ed532e583f8557b680f505
|
4
|
+
data.tar.gz: 0ec0ffa66dbd906af1021d53e533f448949d48f605505ace7ad04c6d4fa3d557
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfe791a46dfad464601c97c582dffcc415aae9525602bf892f6fafeb6aca3ba1f799161d5967958f0b3ad03201ca0537978f75add6afb64435cdb79372056d1f
|
7
|
+
data.tar.gz: 67bca0ab9ccaab58eecbc021175b79dfdab7df5bad4a8fbde909fc957c85516521260b6a3252fbfe7d16ab3bc99d12e7bfb018a851165bb82d9c5a8412c40627
|
data/README.md
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
[Tailwind CSS](https://tailwindcss.com) is a utility-first CSS framework packed with classes like flex, pt-4, text-center and rotate-90 that can be composed to build any design, directly in your markup.
|
4
4
|
|
5
|
-
This gem gives access to the standard Tailwind CSS framework configured for dark mode, forms, aspect-ratio, typography, and the Inter font via the asset pipeline using Sprockets
|
5
|
+
This gem gives access to the standard Tailwind CSS framework configured for dark mode, forms, aspect-ratio, typography, and the Inter font via the asset pipeline using Sprockets (and soon [Propshaft](https://github.com/rails/propshaft)).
|
6
|
+
|
7
|
+
If you need to customize Tailwind, you will need to install it under a full JavaScript bundling setup, such as [cssbundling-rails](https://github.com/rails/cssbundling-rails). This gem was specifically designed not to require a Node.js environment. If you're already using such an environment, you won't need this gem.
|
6
8
|
|
7
9
|
Production-mode purging of unused css class names is provided by a Sprockets compressor built into this gem. This compressor ensures that only the css classes used by files in `app/views` and `app/helpers` are included. In development mode, the full 7mb+ Tailwind stylesheet is loaded.
|
8
10
|
|
data/Rakefile
CHANGED
@@ -38,6 +38,6 @@
|
|
38
38
|
|
39
39
|
<% end -%>
|
40
40
|
<div class="inline">
|
41
|
-
<%%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium" %>
|
41
|
+
<%%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
|
42
42
|
</div>
|
43
43
|
<%% end %>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
<%%= link_to 'Edit this <%= singular_table_name %>', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
10
10
|
<div class="inline-block ml-2">
|
11
|
-
<%%= button_to '
|
11
|
+
<%%= button_to 'Destroy this <%= singular_table_name %>', <%= singular_table_name %>_path(@<%= singular_table_name %>), method: :delete, data: { confirm: "Are you sure you want to delete this <%= singular_table_name %>?" }, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
|
12
12
|
</div>
|
13
13
|
<%%= link_to 'Back to <%= plural_table_name %>', <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
14
14
|
</div>
|
@@ -10,8 +10,8 @@ class Tailwindcss::Compressor
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def initialize(options = {})
|
13
|
-
@options = {
|
14
|
-
files_with_class_names:
|
13
|
+
@options = {
|
14
|
+
files_with_class_names: files_with_class_names,
|
15
15
|
only_purge: %w[ tailwind ]
|
16
16
|
}.merge(options).freeze
|
17
17
|
end
|
@@ -23,4 +23,11 @@ class Tailwindcss::Compressor
|
|
23
23
|
input[:data]
|
24
24
|
end
|
25
25
|
end
|
26
|
+
|
27
|
+
private
|
28
|
+
def files_with_class_names
|
29
|
+
Rails.root.glob("app/views/**/*.*") +
|
30
|
+
Rails.root.glob("app/helpers/**/*.rb") +
|
31
|
+
Rails.root.glob("app/javascript/**/*.js")
|
32
|
+
end
|
26
33
|
end
|
data/lib/tailwindcss/engine.rb
CHANGED
data/lib/tailwindcss/version.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tailwindcss-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -51,6 +51,11 @@ files:
|
|
51
51
|
- app/assets/fonts/Inter-roman.vietnamese.var.woff2
|
52
52
|
- app/assets/stylesheets/inter-font.css.erb
|
53
53
|
- app/assets/stylesheets/tailwind.css
|
54
|
+
- lib/generators/tailwindcss/controller/controller_generator.rb
|
55
|
+
- lib/generators/tailwindcss/controller/templates/view.html.erb.tt
|
56
|
+
- lib/generators/tailwindcss/mailer/mailer_generator.rb
|
57
|
+
- lib/generators/tailwindcss/mailer/templates/view.html.erb.tt
|
58
|
+
- lib/generators/tailwindcss/mailer/templates/view.text.erb.tt
|
54
59
|
- lib/generators/tailwindcss/scaffold/scaffold_generator.rb
|
55
60
|
- lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
|
56
61
|
- lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt
|
@@ -85,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
90
|
- !ruby/object:Gem::Version
|
86
91
|
version: '0'
|
87
92
|
requirements: []
|
88
|
-
rubygems_version: 3.
|
93
|
+
rubygems_version: 3.2.32
|
89
94
|
signing_key:
|
90
95
|
specification_version: 4
|
91
96
|
summary: Integrate Tailwind CSS with the asset pipeline in Rails.
|