tailwindcss-rails 2.0.0-x86_64-darwin → 2.0.1-x86_64-darwin

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: 77c8bbc3b3bda9235aa3ed1be9faa26499da5136110f0be4421d182dff871a59
4
- data.tar.gz: 328001f9b48ce2b6109afb3b8d103ad87702f80dc6a28053950240e1e7d499ba
3
+ metadata.gz: e79303849894c3afe17ae404e5f35e243484cbc7e294c2408b5932de56b28f04
4
+ data.tar.gz: 51c9349082722382369dc5e3228a4e9968103e536fa3e82b6df0c33cb03c4082
5
5
  SHA512:
6
- metadata.gz: c05da266a9c778b8a8ffa424021940d6d795f88ac248065d43ca1653d12da2219b5e3afe2aacfeea7db14e94c99cd408e20def938fd4955f7584dbdbb2a46650
7
- data.tar.gz: 61f2a025717587743a0a609df5f04d7124e19d3649820273f062abaffd16a03e014e066e9230677aa742ac0214277dac9e835df6ce6554a4cf353cdc0e46c20e
6
+ metadata.gz: a8a1eca9f4a5f59dc3139e0f4cea3a2b093fc5a7a4281fbde659dba2e564f7017f6ac7a070e899941b45ec1dc15859ca8de013d214bc31947845069218d74bfc
7
+ data.tar.gz: 1780964398cf67e069f7b679ccaca8a463084a57c36447dcabe25c54ab47ad464d52f4611da48a5f6bac025f98e9342ae51b2123a8962a3d0c14254a19c8aba0
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 CHANGED
@@ -2,17 +2,37 @@
2
2
  # because rubygems shims assume a gem's executables are Ruby
3
3
 
4
4
  require "shellwords"
5
+ require "tailwindcss/upstream"
5
6
 
6
- platform_dir = Dir.glob(File.join(__dir__, "*")).select do |f|
7
- File.directory?(f) && Gem::Platform.match(File.basename(f))
8
- end.first
9
- if platform_dir.nil?
10
- raise "Cannot find the tailwindcss executable in #{__dir__} (1)"
7
+ supported_platforms = Tailwindcss::Upstream::NATIVE_PLATFORMS.keys
8
+
9
+ if supported_platforms.none? { |supported_platform| Gem::Platform.match(supported_platform) }
10
+ STDERR.puts(<<~ERRMSG)
11
+ ERROR: tailwindcss-rails does not support the #{::Gem::Platform.local} platform
12
+ Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation
13
+ ERRMSG
14
+ exit 1
15
+ end
16
+
17
+ exe_path = Dir.glob(File.join(__dir__, "*", "tailwindcss")).find do |f|
18
+ Gem::Platform.match(File.basename(File.dirname(f)))
11
19
  end
20
+ if exe_path.nil?
21
+ STDERR.puts(<<~ERRMSG)
22
+ ERROR: Cannot find the tailwindcss executable for #{::Gem::Platform.local} in #{__dir__}
23
+ If you're using bundler, please make sure you're on the latest bundler version:
24
+
25
+ gem install bundler
26
+ bundle update --bundler
27
+
28
+ Then make sure your lock file includes this platform by running:
29
+
30
+ bundle lock --add-platform #{::Gem::Platform.local}
31
+ bundle install
12
32
 
13
- exe_path = File.join(platform_dir, "tailwindcss")
14
- if !File.exist?(exe_path)
15
- raise "Cannot find the tailwindcss executable in #{__dir__} (2)"
33
+ See `bundle lock --help` output for details.
34
+ ERRMSG
35
+ exit 1
16
36
  end
17
37
 
18
38
  command = Shellwords.join([exe_path, ARGV].flatten)
@@ -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
 
@@ -0,0 +1,14 @@
1
+ module Tailwindcss
2
+ # constants describing the upstream tailwindcss project
3
+ module Upstream
4
+ VERSION = "v3.0.5"
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
+ }
13
+ end
14
+ end
@@ -1,3 +1,3 @@
1
1
  module Tailwindcss
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
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
4
+ version: 2.0.1
5
5
  platform: x86_64-darwin
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: 2021-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -74,6 +74,7 @@ files:
74
74
  - lib/install/tailwindcss.rb
75
75
  - lib/tailwindcss-rails.rb
76
76
  - lib/tailwindcss/engine.rb
77
+ - lib/tailwindcss/upstream.rb
77
78
  - lib/tailwindcss/version.rb
78
79
  - lib/tasks/build.rake
79
80
  - lib/tasks/clobber.rake