tailwindcss-rails 3.0.0 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5c715119cb263746cfdab2913891b82d7a63f04195c4245d2d20bc49b3391f3
4
- data.tar.gz: f4af87ff266042199d3636538ebc31d24107908b9d49450d51d2d23fef231d19
3
+ metadata.gz: ee1e391824b503c8e61b8a2febd7ccd47d31614bfefd933e272a70e6b02f7e9a
4
+ data.tar.gz: 0b19a09424bdf6f2b8a74bc0cff3867373bd1a6c04c20ecb83ccdb1e2528d8eb
5
5
  SHA512:
6
- metadata.gz: e3dd3c2781869d7b8d7eba4a0bc7f71f431a890bc5686eec2580f17698c25de4e76c009b97f601775b82feb56621dc14ec454784275f2d80e5fbd8edb901d87c
7
- data.tar.gz: b6777aaa6a4211e289d2d55f439bd1b3dec33ed6f87b2617c970fdc1da15d20edeb4bd66e8454c221bb9ae73869ac9f98e527230183f94fd2608a38777e034d3
6
+ metadata.gz: ce439d9897933e3c38d64a1bf6459d47cbe9ebf7daa0c79dac66dd1e7e62012eb0602dc0adb2bf239a37c9d2709e429a8912d1918768a777abb9bc5454354e36
7
+ data.tar.gz: 14b70eee495bc67c4f465c041345d48acc5d985a3a06b2fead4bea4f90e5c521eb2aa854fa4f67b3df244aa4d63239bbd27ae1d9edab28a2790d322f3eb75023
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`
@@ -151,7 +151,7 @@ Running `bin/dev` invokes Foreman to start both the Tailwind watch process and t
151
151
 
152
152
  ### Using with PostCSS
153
153
 
154
- If you want to use PostCSS as a preprocessor, create a custom `config/postcss.config.js` and it will be loaded automatically.
154
+ If you want to use PostCSS as a preprocessor, create a custom `config/postcss.config.js` and that file will be loaded by tailwind automatically.
155
155
 
156
156
  For example, to enable nesting:
157
157
 
@@ -167,6 +167,25 @@ module.exports = {
167
167
  }
168
168
  ```
169
169
 
170
+ ⚠ Note that PostCSS is a javascript tool with its own prerequisites! By default `tailwindcss-rails` does not require any javascript tooling, so in order to use PostCSS, a `package.json` with dependencies for your plugins and a package manager like `yarn` or `npm` is required, for example:
171
+
172
+ ```json
173
+ // package.json
174
+ {
175
+ "name": "my app",
176
+ "private": true,
177
+ "dependencies": {
178
+ "postcss-advanced-variables": "^4.0.0",
179
+ "postcss-import": "^16.0.1",
180
+ "postcss-mixins": "^9.0.4",
181
+ "tailwindcss": "^3.4.1"
182
+ }
183
+ }
184
+ ```
185
+
186
+ Then you can use yarn or npm to install the dependencies.
187
+
188
+
170
189
  ### Custom inputs or outputs
171
190
 
172
191
  If you need to use a custom input or output file, you can run `bundle exec tailwindcss` to access the platform-specific executable, and give it your own build options.
@@ -7,15 +7,15 @@
7
7
 
8
8
  <%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
9
9
  <div class="my-5">
10
- <%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
10
+ <%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
11
11
  </div>
12
12
 
13
13
  <div class="my-5">
14
- <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
14
+ <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
15
15
  </div>
16
16
 
17
17
  <div class="inline">
18
- <%%= form.submit "Save", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
18
+ <%%= form.submit "Save", class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
19
19
  </div>
20
20
  <%% end %>
21
21
  </div>
@@ -7,11 +7,11 @@
7
7
 
8
8
  <%%= form_with url: passwords_path, class: "contents" do |form| %>
9
9
  <div class="my-5">
10
- <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
10
+ <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
11
11
  </div>
12
12
 
13
13
  <div class="inline">
14
- <%%= form.submit "Email reset instructions", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
14
+ <%%= form.submit "Email reset instructions", class: "rounded-lg px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
15
15
  </div>
16
16
  <%% end %>
17
17
  </div>
@@ -11,20 +11,20 @@
11
11
 
12
12
  <%%= form_with url: session_url, class: "contents" do |form| %>
13
13
  <div class="my-5">
14
- <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
14
+ <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
15
15
  </div>
16
16
 
17
17
  <div class="my-5">
18
- <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
18
+ <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
19
19
  </div>
20
20
 
21
21
  <div class="col-span-6 sm:flex sm:items-center sm:gap-4">
22
22
  <div class="inline">
23
- <%%= form.submit "Sign in", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
23
+ <%%= form.submit "Sign in", class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
24
24
  </div>
25
25
 
26
26
  <div class="mt-4 text-sm text-gray-500 sm:mt-0">
27
- <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline" %>
27
+ <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline hover:no-underline" %>
28
28
  </div>
29
29
  </div>
30
30
  <%% end %>
@@ -1,9 +1,9 @@
1
1
  <%%= form_with(model: <%= model_resource_name %>, class: "contents") do |form| %>
2
2
  <%% if <%= singular_table_name %>.errors.any? %>
3
- <div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-lg mt-3">
3
+ <div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-md mt-3">
4
4
  <h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
5
5
 
6
- <ul>
6
+ <ul class="list-disc ml-6">
7
7
  <%% <%= singular_table_name %>.errors.each do |error| %>
8
8
  <li><%%= error.full_message %></li>
9
9
  <%% end %>
@@ -15,29 +15,29 @@
15
15
  <div class="my-5">
16
16
  <% if attribute.password_digest? -%>
17
17
  <%%= form.label :password %>
18
- <%%= form.password_field :password, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
19
- </div>
18
+ <%%= form.password_field :password, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
19
+ </div>
20
20
 
21
- <div class="my-5">
21
+ <div class="my-5">
22
22
  <%%= form.label :password_confirmation %>
23
- <%%= form.password_field :password_confirmation, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
23
+ <%%= form.password_field :password_confirmation, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password_confirmation].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password_confirmation].any?}] %>
24
24
  <% elsif attribute.attachments? -%>
25
25
  <%%= form.label :<%= attribute.column_name %> %>
26
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
26
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
27
27
  <% else -%>
28
28
  <%%= form.label :<%= attribute.column_name %> %>
29
29
  <% if attribute.field_type == :textarea || attribute.field_type == :text_area -%>
30
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
30
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
31
31
  <% elsif attribute.field_type == :checkbox || attribute.field_type == :check_box -%>
32
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block mt-2 h-5 w-5" %>
32
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow rounded-md border outline-none mt-2 h-5 w-5", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
33
33
  <% else -%>
34
- <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
34
+ <%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow rounded-md border outline-none px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
35
35
  <% end -%>
36
36
  <% end -%>
37
37
  </div>
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 cursor-pointer" %>
41
+ <%%= form.submit class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
42
42
  </div>
43
43
  <%% end %>
@@ -1,8 +1,10 @@
1
- <div class="mx-auto md:w-2/3 w-full">
1
+ <%% content_for :title, "Editing <%= human_name.downcase %>" %>
2
+
3
+ <div class="md:w-2/3 w-full">
2
4
  <h1 class="font-bold text-4xl">Editing <%= human_name.downcase %></h1>
3
5
 
4
6
  <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
5
7
 
6
- <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
7
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
8
+ <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
9
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
8
10
  </div>
@@ -1,21 +1,25 @@
1
+ <%% content_for :title, "<%= human_name.pluralize %>" %>
2
+
1
3
  <div class="w-full">
2
4
  <%% if notice.present? %>
3
- <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%%= notice %></p>
5
+ <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%%= notice %></p>
4
6
  <%% end %>
5
7
 
6
- <%% content_for :title, "<%= human_name.pluralize %>" %>
7
-
8
8
  <div class="flex justify-between items-center">
9
9
  <h1 class="font-bold text-4xl"><%= human_name.pluralize %></h1>
10
- <%%= link_to "New <%= human_name.downcase %>", new_<%= singular_route_name %>_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
10
+ <%%= link_to "New <%= human_name.downcase %>", new_<%= singular_route_name %>_path, class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white block font-medium" %>
11
11
  </div>
12
12
 
13
13
  <div id="<%= plural_table_name %>" class="min-w-full">
14
- <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
15
- <%%= render <%= singular_table_name %> %>
16
- <p>
17
- <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
18
- </p>
14
+ <%% if @<%= plural_table_name %>.any? %>
15
+ <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
16
+ <%%= render <%= singular_table_name %> %>
17
+ <p>
18
+ <%%= link_to "Show this <%= human_name.downcase %>", <%= model_resource_name(singular_table_name) %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
19
+ </p>
20
+ <%% end %>
21
+ <%% else %>
22
+ <p class="text-center my-10">No <%= human_name.downcase.pluralize %> found.</p>
19
23
  <%% end %>
20
24
  </div>
21
25
  </div>
@@ -1,7 +1,9 @@
1
- <div class="mx-auto md:w-2/3 w-full">
1
+ <%% content_for :title, "New <%= human_name.downcase %>" %>
2
+
3
+ <div class="md:w-2/3 w-full">
2
4
  <h1 class="font-bold text-4xl">New <%= human_name.downcase %></h1>
3
5
 
4
6
  <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
5
7
 
6
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
8
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
7
9
  </div>
@@ -12,6 +12,5 @@
12
12
  <%%= <%= singular_name %>.<%= attribute.column_name %> %>
13
13
  <% end -%>
14
14
  </p>
15
-
16
15
  <% end -%>
17
16
  </div>
@@ -1,15 +1,17 @@
1
- <div class="mx-auto md:w-2/3 w-full flex">
2
- <div class="mx-auto">
3
- <%% if notice.present? %>
4
- <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%%= notice %></p>
5
- <%% end %>
6
-
7
- <%%= render @<%= singular_table_name %> %>
8
-
9
- <%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
10
- <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
11
- <div class="inline-block ml-2">
12
- <%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
13
- </div>
1
+ <%% content_for :title, "Showing <%= human_name.downcase %>" %>
2
+
3
+ <div class="md:w-2/3 w-full">
4
+ <%% if notice.present? %>
5
+ <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%%= notice %></p>
6
+ <%% end %>
7
+
8
+ <h1 class="font-bold text-4xl">Showing <%= human_name.downcase %></h1>
9
+
10
+ <%%= render @<%= singular_table_name %> %>
11
+
12
+ <%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "mt-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
13
+ <%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
14
+ <div class="inline-block ml-2">
15
+ <%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium" %>
14
16
  </div>
15
17
  </div>
@@ -15,8 +15,8 @@ module.exports = {
15
15
  },
16
16
  },
17
17
  plugins: [
18
- require('@tailwindcss/forms'),
19
- require('@tailwindcss/typography'),
20
- require('@tailwindcss/container-queries'),
18
+ // require('@tailwindcss/forms'),
19
+ // require('@tailwindcss/typography'),
20
+ // require('@tailwindcss/container-queries'),
21
21
  ]
22
22
  }
@@ -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
- IO.popen(Tailwindcss::Commands.watch_command, 'r+') do |io|
15
- IO.copy_stream(io, $stdout)
15
+ begin
16
+ IO.popen(Tailwindcss::Commands::ENV, 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
 
@@ -2,18 +2,22 @@ require "tailwindcss/ruby"
2
2
 
3
3
  module Tailwindcss
4
4
  module Commands
5
+ ENV = {'BROWSERSLIST_IGNORE_OLD_DATA' => '1'}
6
+
5
7
  class << self
6
8
  def compile_command(debug: false, **kwargs)
9
+ rails_root = defined?(Rails) ? Rails.root : Pathname.new(Dir.pwd)
10
+
7
11
  command = [
8
12
  Tailwindcss::Ruby.executable(**kwargs),
9
- "-i", Rails.root.join("app/assets/stylesheets/application.tailwind.css").to_s,
10
- "-o", Rails.root.join("app/assets/builds/tailwind.css").to_s,
11
- "-c", Rails.root.join("config/tailwind.config.js").to_s,
13
+ "-i", rails_root.join("app/assets/stylesheets/application.tailwind.css").to_s,
14
+ "-o", rails_root.join("app/assets/builds/tailwind.css").to_s,
15
+ "-c", rails_root.join("config/tailwind.config.js").to_s,
12
16
  ]
13
17
 
14
18
  command << "--minify" unless (debug || rails_css_compressor?)
15
19
 
16
- postcss_path = Rails.root.join("config/postcss.config.js")
20
+ postcss_path = rails_root.join("config/postcss.config.js")
17
21
  command += ["--postcss", postcss_path.to_s] if File.exist?(postcss_path)
18
22
 
19
23
  command
@@ -1,3 +1,3 @@
1
1
  module Tailwindcss
2
- VERSION = "3.0.0"
2
+ VERSION = "3.3.2"
3
3
  end
data/lib/tasks/build.rake CHANGED
@@ -4,7 +4,7 @@ namespace :tailwindcss do
4
4
  debug = args.extras.include?("debug")
5
5
  command = Tailwindcss::Commands.compile_command(debug: debug)
6
6
  puts command.inspect if args.extras.include?("verbose")
7
- system(*command, exception: true)
7
+ system(Tailwindcss::Commands::ENV, *command, exception: true)
8
8
  end
9
9
 
10
10
  desc "Watch and build your Tailwind CSS on file changes"
@@ -14,7 +14,7 @@ namespace :tailwindcss do
14
14
  always = args.extras.include?("always")
15
15
  command = Tailwindcss::Commands.watch_command(always: always, debug: debug, poll: poll)
16
16
  puts command.inspect if args.extras.include?("verbose")
17
- system(*command)
17
+ system(Tailwindcss::Commands::ENV, *command)
18
18
  rescue Interrupt
19
19
  puts "Received interrupt, exiting tailwindcss:watch" if args.extras.include?("verbose")
20
20
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwindcss-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-10-15 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: railties
@@ -28,17 +27,16 @@ dependencies:
28
27
  name: tailwindcss-ruby
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - ">="
30
+ - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: '0'
32
+ version: '3.0'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
- - - ">="
37
+ - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: '0'
41
- description:
39
+ version: '3.0'
42
40
  email: david@loudthinking.com
43
41
  executables: []
44
42
  extensions: []
@@ -68,9 +66,6 @@ files:
68
66
  - lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
69
67
  - lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
70
68
  - lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb
71
- - lib/generators/tailwindcss/authentication/templates/views/passwords/edit.html.erb
72
- - lib/generators/tailwindcss/authentication/templates/views/passwords/new.html.erb
73
- - lib/generators/tailwindcss/authentication/templates/views/sessions/new.html.erb
74
69
  - lib/generators/tailwindcss/controller/controller_generator.rb
75
70
  - lib/generators/tailwindcss/controller/templates/view.html.erb.tt
76
71
  - lib/generators/tailwindcss/mailer/mailer_generator.rb
@@ -105,7 +100,6 @@ licenses:
105
100
  metadata:
106
101
  homepage_uri: https://github.com/rails/tailwindcss-rails
107
102
  rubygems_mfa_required: 'true'
108
- post_install_message:
109
103
  rdoc_options: []
110
104
  require_paths:
111
105
  - lib
@@ -120,8 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
114
  - !ruby/object:Gem::Version
121
115
  version: 3.2.0
122
116
  requirements: []
123
- rubygems_version: 3.5.16
124
- signing_key:
117
+ rubygems_version: 3.6.8
125
118
  specification_version: 4
126
119
  summary: Integrate Tailwind CSS with the asset pipeline in Rails.
127
120
  test_files: []
@@ -1,21 +0,0 @@
1
- <div class="mx-auto md:w-2/3 w-full">
2
- <%% if alert = flash[:alert] %>
3
- <p class="py-2 px-3 bg-red-50 mb-5 text-red-500 font-medium rounded-lg inline-block" id="alert"><%%= alert %></p>
4
- <%% end %>
5
-
6
- <h1 class="font-bold text-4xl">Update your password</h1>
7
-
8
- <%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
9
- <div class="my-5">
10
- <%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
11
- </div>
12
-
13
- <div class="my-5">
14
- <%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
15
- </div>
16
-
17
- <div class="inline">
18
- <%%= form.submit "Save", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
19
- </div>
20
- <%% end %>
21
- </div>
@@ -1,17 +0,0 @@
1
- <div class="mx-auto md:w-2/3 w-full">
2
- <%% if alert = flash[:alert] %>
3
- <p class="py-2 px-3 bg-red-50 mb-5 text-red-500 font-medium rounded-lg inline-block" id="alert"><%%= alert %></p>
4
- <%% end %>
5
-
6
- <h1 class="font-bold text-4xl">Forgot your password?</h1>
7
-
8
- <%%= form_with url: passwords_path, class: "contents" do |form| %>
9
- <div class="my-5">
10
- <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
11
- </div>
12
-
13
- <div class="inline">
14
- <%%= form.submit "Email reset instructions", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
15
- </div>
16
- <%% end %>
17
- </div>
@@ -1,31 +0,0 @@
1
- <div class="mx-auto md:w-2/3 w-full">
2
- <%% if alert = flash[:alert] %>
3
- <p class="py-2 px-3 bg-red-50 mb-5 text-red-500 font-medium rounded-lg inline-block" id="alert"><%%= alert %></p>
4
- <%% end %>
5
-
6
- <%% if notice = flash[:notice] %>
7
- <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%%= notice %></p>
8
- <%% end %>
9
-
10
- <h1 class="font-bold text-4xl">Sign in</h1>
11
-
12
- <%%= form_with url: session_url, class: "contents" do |form| %>
13
- <div class="my-5">
14
- <%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
15
- </div>
16
-
17
- <div class="my-5">
18
- <%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
19
- </div>
20
-
21
- <div class="col-span-6 sm:flex sm:items-center sm:gap-4">
22
- <div class="inline">
23
- <%%= form.submit "Sign in", class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
24
- </div>
25
-
26
- <div class="mt-4 text-sm text-gray-500 sm:mt-0">
27
- <%%= link_to "Forgot password?", new_password_path, class: "text-gray-700 underline" %>
28
- </div>
29
- </div>
30
- <%% end %>
31
- </div>