tailwindcss-rails 0.5.1 → 1.0.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: 4b9a393181af6d9379bbaa42ffd29eab2e9d6dce7bb2fd0236a62c75c4eea959
4
- data.tar.gz: 2bf317fe004792663272d86c9c6c21fb97d8251fe4961a8691d96e75a7cda3a1
3
+ metadata.gz: 271a2b804dd59ec03250304b63c4c6e2f789984eef0a054f146d946679837361
4
+ data.tar.gz: 25247c46c616a5cc4fa505779917a1e195cbcda3aa52b6afca93b79fa8d4efab
5
5
  SHA512:
6
- metadata.gz: 8d1a3969b3b2eda650d4fbefe207f3f265084b5701446ceb89f8fa7481bd2496e7bddd7dce686e2ee5f6ed43ed5fa3c40647fbbacfcbb361a61f5930c4761745
7
- data.tar.gz: 788b20a116e5960f7adb7f9a5ed0d57439fbd87c61e881c8cbdcfe23cd95446330cc55f609c91f015254ed47a3718b2a71bc5f33217d24815bbb0dbfff33fa97
6
+ metadata.gz: ecc7197301ae8c84f2d783a660596d33024aaf07e875adba714ea9380bb8c3bdf315be4f49dd743861be182591760bf9782e411ef57a17828002621314106fdd
7
+ data.tar.gz: 6ce32962dd8c4238cfa10720f8c45607de65800322b134ba72d248ed96ed5edd69cbcab726c02e23c1dad9cdea603d23652714f0f7188d375fdd506d94d1f593
data/README.md CHANGED
@@ -58,6 +58,16 @@ The Tailwind CSS main file that's being used before purging consists of these ve
58
58
  * tailwindcss 2.2.15
59
59
 
60
60
 
61
+ ## Compatibility with Tailwind 3.0
62
+
63
+ This gem is not yet compatible with the JIT approach taken with Tailwind 3.0. We're working with the team on an approach that would bring compatibility, but at the moment you'd need to use [cssbundling-rails](https://github.com/rails/cssbundling-rails/) (and thus bring Node into your app) in order to use 3.0.
64
+
65
+
66
+ ## Conflict with sassc-rails
67
+
68
+ Tailwind uses modern CSS features that are not recognized by the `sassc-rails` extension that was included by default in the Gemfile for Rails 6. In order to avoid any errors like `SassC::SyntaxError`, you must remove that gem from your Gemfile.
69
+
70
+
61
71
  ## License
62
72
 
63
73
  Tailwind for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -8,6 +8,7 @@ Rake::TestTask.new(:test) do |t|
8
8
  t.libs << 'test'
9
9
  t.pattern = 'test/**/*_test.rb'
10
10
  t.verbose = false
11
+ t.warning = true
11
12
  end
12
13
 
13
14
  task default: :test
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v2.2.16 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com */
2
2
 
3
3
  /*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
4
4
 
@@ -1,4 +1,4 @@
1
1
  <div>
2
- <h1 class="text-xl font-bold"><%= class_name %>#<%= @action %></h1>
2
+ <h1 class="text-lg font-bold text-4xl"><%= class_name %>#<%= @action %></h1>
3
3
  <p>Find me in <%= @path %></p>
4
- <div>
4
+ </div>
@@ -0,0 +1,9 @@
1
+ require "rails/generators/erb/mailer/mailer_generator"
2
+
3
+ module Tailwindcss
4
+ module Generators
5
+ class MailerGenerator < Erb::Generators::MailerGenerator
6
+ source_root File.expand_path("../templates", __FILE__)
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ <h1><%= class_name %>#<%= @action %></h1>
2
+
3
+ <p>
4
+ <%%= @greeting %>, find me in <%= @path %>
5
+ </p>
@@ -0,0 +1,3 @@
1
+ <%= class_name %>#<%= @action %>
2
+
3
+ <%%= @greeting %>, find me in <%= @path %>
@@ -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 'Delete 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" %>
11
+ <%%= button_to 'Destroy this <%= singular_table_name %>', <%= singular_table_name %>_path(@<%= singular_table_name %>), method: :delete, 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: Rails.root.glob("app/views/**/*.*") + Rails.root.glob("app/helpers/**/*.rb"),
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
@@ -1,3 +1,4 @@
1
+ require "rails"
1
2
  require "tailwindcss/compressor"
2
3
 
3
4
  module Tailwindcss
@@ -1,3 +1,3 @@
1
1
  module Tailwindcss
2
- VERSION = "0.5.1"
2
+ VERSION = "1.0.0"
3
3
  end
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.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-05 00:00:00.000000000 Z
11
+ date: 2021-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -24,7 +24,7 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 6.0.0
27
- description:
27
+ description:
28
28
  email: david@loudthinking.com
29
29
  executables: []
30
30
  extensions: []
@@ -53,6 +53,9 @@ files:
53
53
  - app/assets/stylesheets/tailwind.css
54
54
  - lib/generators/tailwindcss/controller/controller_generator.rb
55
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
56
59
  - lib/generators/tailwindcss/scaffold/scaffold_generator.rb
57
60
  - lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt
58
61
  - lib/generators/tailwindcss/scaffold/templates/edit.html.erb.tt
@@ -72,7 +75,8 @@ licenses:
72
75
  - MIT
73
76
  metadata:
74
77
  homepage_uri: https://github.com/rails/tailwindcss-rails
75
- post_install_message:
78
+ rubygems_mfa_required: 'true'
79
+ post_install_message:
76
80
  rdoc_options: []
77
81
  require_paths:
78
82
  - lib
@@ -87,8 +91,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
91
  - !ruby/object:Gem::Version
88
92
  version: '0'
89
93
  requirements: []
90
- rubygems_version: 3.1.4
91
- signing_key:
94
+ rubygems_version: 3.2.32
95
+ signing_key:
92
96
  specification_version: 4
93
97
  summary: Integrate Tailwind CSS with the asset pipeline in Rails.
94
98
  test_files: []