tailwindcss-rails 2.0.5-aarch64-linux → 2.0.8-aarch64-linux

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: 7f46ea3a0007012091fe6d7c4747960a13e603bc8a501049bf70668e60e55429
4
- data.tar.gz: 1bcb8b94a437d64b4252fa6d6b70bed4b20105e899b0aa5f8beb77dd4abdf3db
3
+ metadata.gz: c7f870301c7ed10851e0e1cd1f5f7a687b207cfe0daf42b12a0fd2da23eea7e1
4
+ data.tar.gz: 041725700fd85d14d703a2a3b3d35ed941f0d029d2cb07886d023df409463f4f
5
5
  SHA512:
6
- metadata.gz: 9cdb1e44f3109113979f0fe4aad179efa03e76454f38bdb8de17ce0a9ffb5d3388f32902d8e6bd1af398f259d6ec0e61ebd0c6a055ce91f6758729b4575f8bc5
7
- data.tar.gz: db075229af790540f81f5874160c0200b73e797524519223c313d7f8d4bc6353961ec53ba7a62fd83dbd28913424b1181e03c12ffbcacb7a0f55ad4c5202db98
6
+ metadata.gz: b7c221375fd3f7a5a1e62b38da2211776f926511eede408ba758536f6b0e1139d6e072cf1bf4c5839738d7dc2d4d3ba536f731a77722c370581a0e1b8cdbb46c
7
+ data.tar.gz: c7c9945b044f28ae0ff53a144da861ef1695af36736f928a7e65b4ec209660dc531724723bfda4094aa722d663fdc28e9eff8b3f51cb08aabbb9aa9488bdfebb
data/README.md CHANGED
@@ -25,6 +25,9 @@ With Rails 7 you can generate a new application preconfigured with Tailwind by u
25
25
 
26
26
  The `tailwindcss:build` is automatically attached to `assets:precompile`, so before the asset pipeline digests the files, the Tailwind output will be generated.
27
27
 
28
+ ## Building for testing
29
+
30
+ The `tailwindcss:build` is automatically attached to `test:prepare`, which runs before Rails tests. (Note that this currently only applies to rails `test:*` tasks (like `test:all` or `test:controllers`), not "rails test", as that doesn't load `test:prepare`).
28
31
 
29
32
  ## Conflict with sassc-rails
30
33
 
@@ -90,6 +93,27 @@ A fix for this has been proposed upstream at https://github.com/tailwindlabs/tai
90
93
  apk add build-base gcompat
91
94
  ```
92
95
 
96
+ ### Using asset-pipeline assets
97
+
98
+ In Rails, you want to use [assets from the asset pipeline to get fingerprinting](https://guides.rubyonrails.org/asset_pipeline.html#what-is-fingerprinting-and-why-should-i-care-questionmark). However, Tailwind isn't aware of those assets. To use assets from the pipeline, use `url(image.svg)`. [Since Sprockets v3.3.0](https://github.com/rails/sprockets-rails/pull/476) `url(image.svg)` will then automatically be rewritten to `/path/to/assets/image-7801e7538c6f1cc57aa75a5876ab0cac.svg`. So the output CSS will have the correct path to those assets.
99
+
100
+ ```js
101
+ module.exports = {
102
+ theme: {
103
+ extend: {
104
+ backgroundImage: {
105
+ 'image': "url('image.svg')"
106
+ }
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ The inline version also works:
113
+
114
+ ```html
115
+ <section class="bg-[url('image.svg')]">Has the image as it's background</section>
116
+ ```
93
117
 
94
118
  ## License
95
119
 
Binary file
data/exe/tailwindcss CHANGED
@@ -32,6 +32,11 @@ if exe_path.nil?
32
32
  bundle install
33
33
 
34
34
  See `bundle lock --help` output for details.
35
+
36
+ If you're still seeing this message after taking those steps, try running
37
+ `bundle config` and ensure `force_ruby_platform` isn't set to `true`. See
38
+ https://github.com/rails/tailwindcss-rails#check-bundle_force_ruby_platform
39
+ for more details.
35
40
  ERRMSG
36
41
  exit 1
37
42
  end
@@ -4,7 +4,7 @@ module.exports = {
4
4
  content: [
5
5
  './app/helpers/**/*.rb',
6
6
  './app/javascript/**/*.js',
7
- './app/views/**/*'
7
+ './app/views/**/*.{erb,haml,html,slim}'
8
8
  ],
9
9
  theme: {
10
10
  extend: {
@@ -7,8 +7,10 @@ if APPLICATION_LAYOUT_PATH.exist?
7
7
  <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
8
8
  ERB
9
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
+ if File.open(APPLICATION_LAYOUT_PATH).read =~ /<body>\n\s*<%= yield %>\n\s*<\/body>/
11
+ insert_into_file APPLICATION_LAYOUT_PATH.to_s, %( <main class="container mx-auto mt-28 px-5 flex">\n ), before: CENTERING_CONTAINER_INSERTION_POINT
12
+ insert_into_file APPLICATION_LAYOUT_PATH.to_s, %(\n </main>), after: CENTERING_CONTAINER_INSERTION_POINT
13
+ end
12
14
  else
13
15
  say "Default application.html.erb is missing!", :red
14
16
  say %( Add <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %> within the <head> tag in your custom layout.)
@@ -1,7 +1,7 @@
1
1
  module Tailwindcss
2
2
  # constants describing the upstream tailwindcss project
3
3
  module Upstream
4
- VERSION = "v3.0.15"
4
+ VERSION = "v3.0.23"
5
5
 
6
6
  # rubygems platform name => upstream release filename
7
7
  NATIVE_PLATFORMS = {
@@ -1,3 +1,3 @@
1
1
  module Tailwindcss
2
- VERSION = "2.0.5"
2
+ VERSION = "2.0.8"
3
3
  end
data/lib/tasks/build.rake CHANGED
@@ -1,4 +1,4 @@
1
- TAILWIND_COMPILE_COMMAND = "#{Pathname.new(__dir__).to_s}/../../exe/tailwindcss -i #{Rails.root.join("app/assets/stylesheets/application.tailwind.css")} -o #{Rails.root.join("app/assets/builds/tailwind.css")} -c #{Rails.root.join("config/tailwind.config.js")}"
1
+ TAILWIND_COMPILE_COMMAND = "#{RbConfig.ruby} #{Pathname.new(__dir__).to_s}/../../exe/tailwindcss -i #{Rails.root.join("app/assets/stylesheets/application.tailwind.css")} -o #{Rails.root.join("app/assets/builds/tailwind.css")} -c #{Rails.root.join("config/tailwind.config.js")} --minify"
2
2
 
3
3
  namespace :tailwindcss do
4
4
  desc "Build your Tailwind CSS"
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.5
4
+ version: 2.0.8
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-16 00:00:00.000000000 Z
11
+ date: 2022-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -24,7 +24,7 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 6.0.0
27
- description:
27
+ description:
28
28
  email: david@loudthinking.com
29
29
  executables:
30
30
  - tailwindcss
@@ -52,7 +52,6 @@ files:
52
52
  - app/assets/fonts/Inter-roman.symbols.var.woff2
53
53
  - app/assets/fonts/Inter-roman.vietnamese.var.woff2
54
54
  - app/assets/stylesheets/inter-font.css
55
- - app/assets/stylesheets/tailwind.css
56
55
  - exe/aarch64-linux/tailwindcss
57
56
  - exe/tailwindcss
58
57
  - lib/generators/tailwindcss/controller/controller_generator.rb
@@ -85,7 +84,7 @@ licenses:
85
84
  metadata:
86
85
  homepage_uri: https://github.com/rails/tailwindcss-rails
87
86
  rubygems_mfa_required: 'true'
88
- post_install_message:
87
+ post_install_message:
89
88
  rdoc_options: []
90
89
  require_paths:
91
90
  - lib
@@ -100,8 +99,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
99
  - !ruby/object:Gem::Version
101
100
  version: '0'
102
101
  requirements: []
103
- rubygems_version: 3.2.32
104
- signing_key:
102
+ rubygems_version: 3.1.4
103
+ signing_key:
105
104
  specification_version: 4
106
105
  summary: Integrate Tailwind CSS with the asset pipeline in Rails.
107
106
  test_files: []