tailwindcss-rails 2.0.1-x64-mingw32 → 2.0.5-x64-mingw32

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: 84b9167b4123aa5019771274917b87a9620747cc91ab5fe1f80013798f75fecf
4
- data.tar.gz: b44e0778bf972a42739898eb827515e923f538b535055da75fd45ce1cec4afa6
3
+ metadata.gz: ffd4849fa278d77bd3b18cba2f9f4a812eebfbabfc8590ec4af3937b2053fe95
4
+ data.tar.gz: 8f295a079d2039d7b1611fcde74ca39edfdd5171f2a90babec10d46dfd2b44c3
5
5
  SHA512:
6
- metadata.gz: f5c8c57cec86b12a18600c11d30942c231eca3e491aab4f94e538672945440a3554e39e99ec15ebbf38aa6e782efa855f5239e0454882a08eea0cd5e50b93d65
7
- data.tar.gz: 0e4173cb32b9968cdf7a16c6ab27028f7b0b7e95df14c58a0914b084980229a154936ec138fd1a23ffe37cfccf8da9976a79c8af2a4865bceedb0c5d347c74d9
6
+ metadata.gz: 75214918f82a491081ef339fe4510ad68a162f94dd366a10048278051c8390edc4372229ad3706554822f9a0f0067176748732302e303aedd1c3bee2e6093bad
7
+ data.tar.gz: 6e46d233efd69c68337da2f050707069096acedaf7fddc6a734f5f4bd1989179cdf0f29c7c1f6a00191e698e9c2e34db96ccafc59a4c0a0a97a6bee04ff8f74f
data/README.md CHANGED
@@ -30,6 +30,66 @@ The `tailwindcss:build` is automatically attached to `assets:precompile`, so bef
30
30
 
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
+ ## Class names must be spelled out
34
+
35
+ For Tailwind to work, your class names need to be spelled out. They can't be programmatically composed. So no "text-gray-#{grade}", only "text-gray-500".
36
+
37
+ ## Troubleshooting
38
+
39
+ Some common problems experienced by users ...
40
+
41
+ ### ERROR: Cannot find the tailwindcss executable for <supported platform>
42
+
43
+ Some users are reporting this error even when running on one of the supported native platforms:
44
+
45
+ - arm64-darwin
46
+ - x64-mingw32
47
+ - x86_64-darwin
48
+ - x86_64-linux
49
+ - aarch64-linux
50
+
51
+ #### Check Bundler PLATFORMS
52
+
53
+ 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:
54
+
55
+ ``` sh
56
+ bundle lock --add-platform <platform-name>
57
+ ```
58
+
59
+ and re-bundle.
60
+
61
+
62
+ #### Check BUNDLE_FORCE_RUBY_PLATFORM
63
+
64
+ Another common cause of this is that bundler is configured to always use the "ruby" platform via the
65
+ `BUNDLE_FORCE_RUBY_PLATFORM` config parameter being set to `true`. Please remove this configuration:
66
+
67
+ ``` sh
68
+ bundle config unset force_ruby_platform
69
+ # or
70
+ bundle config set --local force_ruby_platform false
71
+ ```
72
+
73
+ and re-bundle.
74
+
75
+ See https://bundler.io/man/bundle-config.1.html for more information.
76
+
77
+
78
+ ### "No such file or directory" running on Alpine (musl)
79
+
80
+ When running `tailwindcss` on an Alpine system, some users report a "No such file or directory" error message.
81
+
82
+
83
+ #### Install gnu libc compatibility
84
+
85
+ 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.
86
+
87
+ 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:
88
+
89
+ ``` sh
90
+ apk add build-base gcompat
91
+ ```
92
+
33
93
 
34
94
  ## License
35
95
 
data/exe/tailwindcss CHANGED
@@ -5,10 +5,11 @@ require "shellwords"
5
5
  require "tailwindcss/upstream"
6
6
 
7
7
  supported_platforms = Tailwindcss::Upstream::NATIVE_PLATFORMS.keys
8
+ platform = [:cpu, :os].map { |m| Gem::Platform.local.send(m) }.join("-")
8
9
 
9
10
  if supported_platforms.none? { |supported_platform| Gem::Platform.match(supported_platform) }
10
11
  STDERR.puts(<<~ERRMSG)
11
- ERROR: tailwindcss-rails does not support the #{::Gem::Platform.local} platform
12
+ ERROR: tailwindcss-rails does not support the #{platform} platform
12
13
  Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation
13
14
  ERRMSG
14
15
  exit 1
@@ -19,7 +20,7 @@ exe_path = Dir.glob(File.join(__dir__, "*", "tailwindcss")).find do |f|
19
20
  end
20
21
  if exe_path.nil?
21
22
  STDERR.puts(<<~ERRMSG)
22
- ERROR: Cannot find the tailwindcss executable for #{::Gem::Platform.local} in #{__dir__}
23
+ ERROR: Cannot find the tailwindcss executable for #{platform} in #{__dir__}
23
24
  If you're using bundler, please make sure you're on the latest bundler version:
24
25
 
25
26
  gem install bundler
@@ -27,7 +28,7 @@ if exe_path.nil?
27
28
 
28
29
  Then make sure your lock file includes this platform by running:
29
30
 
30
- bundle lock --add-platform #{::Gem::Platform.local}
31
+ bundle lock --add-platform #{platform}
31
32
  bundle install
32
33
 
33
34
  See `bundle lock --help` output for details.
@@ -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: {
@@ -1,12 +1,14 @@
1
- APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")
1
+ APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")
2
+ CENTERING_CONTAINER_INSERTION_POINT = /^\s*<%= yield %>/.freeze
2
3
 
3
4
  if APPLICATION_LAYOUT_PATH.exist?
4
5
  say "Add Tailwindcss include tags and container element in application layout"
5
6
  insert_into_file APPLICATION_LAYOUT_PATH.to_s, <<~ERB.indent(4), before: /^\s*<%= stylesheet_link_tag/
6
7
  <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
7
8
  ERB
8
- insert_into_file APPLICATION_LAYOUT_PATH.to_s, %( <main class="container mx-auto mt-28 px-5 flex">\n ), before: /^\s*<%= yield/
9
- insert_into_file APPLICATION_LAYOUT_PATH.to_s, %(\n </main>), after: /^\s*<%= yield %>/
9
+
10
+ insert_into_file APPLICATION_LAYOUT_PATH.to_s, %( <main class="container mx-auto mt-28 px-5 flex">\n ), before: CENTERING_CONTAINER_INSERTION_POINT
11
+ insert_into_file APPLICATION_LAYOUT_PATH.to_s, %(\n </main>), after: CENTERING_CONTAINER_INSERTION_POINT
10
12
  else
11
13
  say "Default application.html.erb is missing!", :red
12
14
  say %( Add <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %> within the <head> tag in your custom layout.)
@@ -35,7 +37,7 @@ unless Rails.root.join("app/assets/stylesheets/application.tailwind.css").exist?
35
37
  end
36
38
 
37
39
  if Rails.root.join("Procfile.dev").exist?
38
- append_to_file "Procfile.dev", "css: rails tailwindcss:watch\n"
40
+ append_to_file "Procfile.dev", "css: bin/rails tailwindcss:watch\n"
39
41
  else
40
42
  say "Add default Procfile.dev"
41
43
  copy_file "#{__dir__}/Procfile.dev", "Procfile.dev"
@@ -10,8 +10,8 @@ module Tailwindcss
10
10
  Rails.application.config.generators.stylesheets = false
11
11
  end
12
12
 
13
- config.app_generators do |g|
14
- g.template_engine :tailwindcss
15
- end
13
+ config.app_generators do |g|
14
+ g.template_engine :tailwindcss
15
+ end
16
16
  end
17
17
  end
@@ -1,7 +1,7 @@
1
1
  module Tailwindcss
2
2
  # constants describing the upstream tailwindcss project
3
3
  module Upstream
4
- VERSION = "v3.0.5"
4
+ VERSION = "v3.0.15"
5
5
 
6
6
  # rubygems platform name => upstream release filename
7
7
  NATIVE_PLATFORMS = {
@@ -9,6 +9,7 @@ module Tailwindcss
9
9
  "x64-mingw32" => "tailwindcss-windows-x64.exe",
10
10
  "x86_64-darwin" => "tailwindcss-macos-x64",
11
11
  "x86_64-linux" => "tailwindcss-linux-x64",
12
+ "aarch64-linux" => "tailwindcss-linux-arm64",
12
13
  }
13
14
  end
14
15
  end
@@ -1,3 +1,3 @@
1
1
  module Tailwindcss
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.5"
3
3
  end
data/lib/tasks/build.rake CHANGED
@@ -6,6 +6,7 @@ namespace :tailwindcss do
6
6
  system TAILWIND_COMPILE_COMMAND
7
7
  end
8
8
 
9
+ desc "Watch and build your Tailwind CSS on file changes"
9
10
  task :watch do
10
11
  system "#{TAILWIND_COMPILE_COMMAND} -w"
11
12
  end
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.1
4
+ version: 2.0.5
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-19 00:00:00.000000000 Z
11
+ date: 2022-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties