tailwindcss-rails 2.0.0.rc1 → 2.0.3

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: d22f4bc34ab3304b899f7d195dcbeb00feeb81fde432467f7c2d27e04ab8a543
4
- data.tar.gz: 86c44ee8942497bc4e3bb13b21b4ae9083ccdeee0564a0072bd6bcd9b5e60a34
3
+ metadata.gz: 5c09153300325d7b67d239f117852078a9c3d045941d5af4b9f614953383795d
4
+ data.tar.gz: 07fe9aca3e1b23b4909823cf00bebb5df2535190459dc62868be3a347d082fc9
5
5
  SHA512:
6
- metadata.gz: d4c956629e2327712f54111be1388c701a357c435ceabf65bac7a3ceddf0d04ca0d570f517fb65315d3635162c8c1036218e1b54712b82cbb586a53606edca58
7
- data.tar.gz: 88ef347089d11ac3edb5d04d121898eaee279aafb627db1cac290cd527e68bc1249d74578c9b525ffe0f277c64eb50fea9d0a49eb67ef5d765ccb75b74922636
6
+ metadata.gz: 7174d0296b6fa462b5f0404a152ab12961fee7a4f971e8578cbe1731a764ef604422e4abca7912ea675b5dc517ba7608769ef0818fa99c075f102b78f3593512
7
+ data.tar.gz: 70db6509c906fe5b42d456521fac87584e37c52a04a7e67c4301c2d41bd3caf1668f49e59b8262a60de90e4e683686da4bc9f705bd7c46e1c2afb18daef38a82
data/README.md CHANGED
@@ -2,7 +2,7 @@
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 wraps [the standalone executable version](https://tailwindcss.com/blog/standalone-cli) of the Tailwind CSS 3 framework. These executables are platform specific, but so there's actually separate underlying gems per platform, but the correct gem will automatically be picked for your platform. Supported platforms are Linux x64, macOS arm64, macOS x64, and Windows x64. (Note that due to this setup, you must install the actual gems – you can't pin your gem to the github repo.)
5
+ This gem wraps [the standalone executable version](https://tailwindcss.com/blog/standalone-cli) of the Tailwind CSS 3 framework. These executables are platform specific, so there are actually separate underlying gems per platform, but the correct gem will automatically be picked for your platform. Supported platforms are Linux x64, macOS arm64, macOS x64, and Windows x64. (Note that due to this setup, you must install the actual gems – you can't pin your gem to the github repo.)
6
6
 
7
7
  You can customize the Tailwind build through the `config/tailwind.config.js` file, just like you would if Tailwind was running in a traditional node installation. All the first-party plugins are supported.
8
8
 
data/exe/tailwindcss ADDED
@@ -0,0 +1,41 @@
1
+ #! /usr/bin/env ruby
2
+ # because rubygems shims assume a gem's executables are Ruby
3
+
4
+ require "shellwords"
5
+ require "tailwindcss/upstream"
6
+
7
+ supported_platforms = Tailwindcss::Upstream::NATIVE_PLATFORMS.keys
8
+ platform = [:cpu, :os].map { |m| Gem::Platform.local.send(m) }.join("-")
9
+
10
+ if supported_platforms.none? { |supported_platform| Gem::Platform.match(supported_platform) }
11
+ STDERR.puts(<<~ERRMSG)
12
+ ERROR: tailwindcss-rails does not support the #{platform} platform
13
+ Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation
14
+ ERRMSG
15
+ exit 1
16
+ end
17
+
18
+ exe_path = Dir.glob(File.join(__dir__, "*", "tailwindcss")).find do |f|
19
+ Gem::Platform.match(File.basename(File.dirname(f)))
20
+ end
21
+ if exe_path.nil?
22
+ STDERR.puts(<<~ERRMSG)
23
+ ERROR: Cannot find the tailwindcss executable for #{platform} in #{__dir__}
24
+ If you're using bundler, please make sure you're on the latest bundler version:
25
+
26
+ gem install bundler
27
+ bundle update --bundler
28
+
29
+ Then make sure your lock file includes this platform by running:
30
+
31
+ bundle lock --add-platform #{platform}
32
+ bundle install
33
+
34
+ See `bundle lock --help` output for details.
35
+ ERRMSG
36
+ exit 1
37
+ end
38
+
39
+ command = Shellwords.join([exe_path, ARGV].flatten)
40
+ puts "+ #{command}"
41
+ exec(command)
@@ -1,4 +1,4 @@
1
1
  <div>
2
- <h1 class="text-lg font-bold text-4xl"><%= class_name %>#<%= @action %></h1>
2
+ <h1 class="font-bold text-4xl"><%= class_name %>#<%= @action %></h1>
3
3
  <p>Find me in <%= @path %></p>
4
4
  </div>
@@ -4,7 +4,7 @@
4
4
  <%% end %>
5
5
 
6
6
  <div class="flex justify-between items-center">
7
- <h1 class="text-lg font-bold text-4xl"><%= human_name.pluralize %></h1>
7
+ <h1 class="font-bold text-4xl"><%= human_name.pluralize %></h1>
8
8
  <%%= 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" %>
9
9
  </div>
10
10
 
@@ -1,5 +1,5 @@
1
1
  <div class="mx-auto md:w-2/3 w-full">
2
- <h1 class="text-lg font-bold text-4xl">New <%= human_name.downcase %></h1>
2
+ <h1 class="font-bold text-4xl">New <%= human_name.downcase %></h1>
3
3
 
4
4
  <%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
5
5
 
@@ -1,12 +1,11 @@
1
1
  const defaultTheme = require('tailwindcss/defaultTheme')
2
2
 
3
3
  module.exports = {
4
- darkMode: 'media',
5
4
  content: [
6
5
  './app/helpers/**/*.rb',
7
6
  './app/javascript/**/*.js',
8
7
  './app/views/**/*'
9
- ],
8
+ ],
10
9
  theme: {
11
10
  extend: {
12
11
  fontFamily: {
@@ -0,0 +1,15 @@
1
+ module Tailwindcss
2
+ # constants describing the upstream tailwindcss project
3
+ module Upstream
4
+ VERSION = "v3.0.8"
5
+
6
+ # rubygems platform name => upstream release filename
7
+ NATIVE_PLATFORMS = {
8
+ "arm64-darwin" => "tailwindcss-macos-arm64",
9
+ "x64-mingw32" => "tailwindcss-windows-x64.exe",
10
+ "x86_64-darwin" => "tailwindcss-macos-x64",
11
+ "x86_64-linux" => "tailwindcss-linux-x64",
12
+ "aarch64-linux" => "tailwindcss-linux-arm64",
13
+ }
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module Tailwindcss
2
- VERSION = "2.0.0.rc1"
2
+ VERSION = "2.0.3"
3
3
  end
@@ -1,5 +1,6 @@
1
1
  module Tailwindcss
2
2
  end
3
3
 
4
+ require "tailwindcss/upstream"
4
5
  require "tailwindcss/version"
5
6
  require "tailwindcss/engine"
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.0.rc1
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-18 00:00:00.000000000 Z
11
+ date: 2022-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -26,7 +26,8 @@ dependencies:
26
26
  version: 6.0.0
27
27
  description:
28
28
  email: david@loudthinking.com
29
- executables: []
29
+ executables:
30
+ - tailwindcss
30
31
  extensions: []
31
32
  extra_rdoc_files: []
32
33
  files:
@@ -51,6 +52,7 @@ files:
51
52
  - app/assets/fonts/Inter-roman.vietnamese.var.woff2
52
53
  - app/assets/stylesheets/inter-font.css
53
54
  - app/assets/stylesheets/tailwind.css
55
+ - exe/tailwindcss
54
56
  - lib/generators/tailwindcss/controller/controller_generator.rb
55
57
  - lib/generators/tailwindcss/controller/templates/view.html.erb.tt
56
58
  - lib/generators/tailwindcss/mailer/mailer_generator.rb
@@ -70,6 +72,7 @@ files:
70
72
  - lib/install/tailwindcss.rb
71
73
  - lib/tailwindcss-rails.rb
72
74
  - lib/tailwindcss/engine.rb
75
+ - lib/tailwindcss/upstream.rb
73
76
  - lib/tailwindcss/version.rb
74
77
  - lib/tasks/build.rake
75
78
  - lib/tasks/clobber.rake
@@ -91,9 +94,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
94
  version: '0'
92
95
  required_rubygems_version: !ruby/object:Gem::Requirement
93
96
  requirements:
94
- - - ">"
97
+ - - ">="
95
98
  - !ruby/object:Gem::Version
96
- version: 1.3.1
99
+ version: '0'
97
100
  requirements: []
98
101
  rubygems_version: 3.2.32
99
102
  signing_key: