tailwindcss-rails 2.0.0.rc1-arm64-darwin → 2.0.4-arm64-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: 995bec90d72822b8ccc9f03ec6565473b9cfd827b5a7bd894477d25ad64668ec
4
- data.tar.gz: 8aea2b761102aaf5a00b07f93bd8349f496f89a5a680937daf29032a21b7ac95
3
+ metadata.gz: 60dba528adf5681d1d642677152519dc8bc20d84b0b959d06e071c02de66f362
4
+ data.tar.gz: 68f811cfab05d291c44228f16f9bc91e42d8ca114c26a6e43f5c82518415b3b3
5
5
  SHA512:
6
- metadata.gz: 64295e678c4ba0520f640913dd74cc9d0b6c0517dc30a8bca0fd309abe0d34a77b043e8ecbfaa948ea95bc6dfc00b3113d9852383da60be5fab84752910f4186
7
- data.tar.gz: 1bad7f2cc729f3b6aaaf0f346e70d1ddd7f413679f654184ee384fd2797920d6ee98c2ec3b77b3977a1f0e5525fbf58f7312d1f1f6b3b5670b4a45c01b93423d
6
+ metadata.gz: c2071ad021348c55c078f5994df3495e34b2b4674e9be231df31bc3db9418f5c11fcc432bd5e00736acf45f81678cd58abe7d14e6803de15b02db1da24abe4e4
7
+ data.tar.gz: ecef95e4125b1cb92c603b82edc88b21202f084da0173fe1598be18ab55a4dd4cca1e81181593102c2a9896914b2d24909d73cbcf55d83f0c850c8c494013e2c
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
 
@@ -31,6 +31,63 @@ The `tailwindcss:build` is automatically attached to `assets:precompile`, so bef
31
31
  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.
32
32
 
33
33
 
34
+ ## Troubleshooting
35
+
36
+ Some common problems experienced by users ...
37
+
38
+ ### ERROR: Cannot find the tailwindcss executable for <supported platform>
39
+
40
+ Some users are reporting this error even when running on one of the supported native platforms:
41
+
42
+ - arm64-darwin
43
+ - x64-mingw32
44
+ - x86_64-darwin
45
+ - x86_64-linux
46
+ - aarch64-linux
47
+
48
+ #### Check Bundler PLATFORMS
49
+
50
+ A possible cause of this is that Bundler has not been told to include native gems for your current platform. Please check your `Gemfile.lock` file to see whether your native platform is included in the `PLATFORMS` section. If necessary, run:
51
+
52
+ ``` sh
53
+ bundle lock --add-platform <platform-name>
54
+ ```
55
+
56
+ and re-bundle.
57
+
58
+
59
+ #### Check BUNDLE_FORCE_RUBY_PLATFORM
60
+
61
+ Another common cause of this is that bundler is configured to always use the "ruby" platform via the
62
+ `BUNDLE_FORCE_RUBY_PLATFORM` config parameter being set to `true`. Please remove this configuration:
63
+
64
+ ``` sh
65
+ bundle config unset force_ruby_platform
66
+ # or
67
+ bundle config set --local force_ruby_platform false
68
+ ```
69
+
70
+ and re-bundle.
71
+
72
+ See https://bundler.io/man/bundle-config.1.html for more information.
73
+
74
+
75
+ ### "No such file or directory" running on Alpine (musl)
76
+
77
+ When running `tailwindcss` on an Alpine system, some users report a "No such file or directory" error message.
78
+
79
+
80
+ #### Install gnu libc compatibility
81
+
82
+ The cause of this is the upstream `tailwindcss` binary executables being built on a gnu libc system, making them incompatible with standard musl libc systems.
83
+
84
+ A fix for this has been proposed upstream at https://github.com/tailwindlabs/tailwindcss/discussions/6785, but in the meantime a workaround is to install compatibility libraries:
85
+
86
+ ``` sh
87
+ apk add build-base gcompat
88
+ ```
89
+
90
+
34
91
  ## License
35
92
 
36
93
  Tailwind for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).
data/exe/tailwindcss CHANGED
@@ -2,17 +2,38 @@
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
+ 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)))
11
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
12
33
 
13
- exe_path = File.join(platform_dir, "tailwindcss")
14
- if !File.exist?(exe_path)
15
- raise "Cannot find the tailwindcss executable in #{__dir__} (2)"
34
+ See `bundle lock --help` output for details.
35
+ ERRMSG
36
+ exit 1
16
37
  end
17
38
 
18
39
  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
 
@@ -1,2 +1,2 @@
1
1
  web: bin/rails server -p 3000
2
- css: rails tailwindcss:watch
2
+ css: bin/rails tailwindcss:watch
@@ -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: {
@@ -35,7 +35,7 @@ unless Rails.root.join("app/assets/stylesheets/application.tailwind.css").exist?
35
35
  end
36
36
 
37
37
  if Rails.root.join("Procfile.dev").exist?
38
- append_to_file "Procfile.dev", "css: rails tailwindcss:watch\n"
38
+ append_to_file "Procfile.dev", "css: bin/rails tailwindcss:watch\n"
39
39
  else
40
40
  say "Add default Procfile.dev"
41
41
  copy_file "#{__dir__}/Procfile.dev", "Procfile.dev"
@@ -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.4"
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.4
5
5
  platform: arm64-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: 2022-01-06 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
@@ -95,9 +96,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
96
  version: '0'
96
97
  required_rubygems_version: !ruby/object:Gem::Requirement
97
98
  requirements:
98
- - - ">"
99
+ - - ">="
99
100
  - !ruby/object:Gem::Version
100
- version: 1.3.1
101
+ version: '0'
101
102
  requirements: []
102
103
  rubygems_version: 3.2.32
103
104
  signing_key: