tailwindcss-rails 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/exe/tailwindcss +40 -0
- data/lib/generators/tailwindcss/controller/templates/view.html.erb.tt +1 -1
- data/lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt +1 -1
- data/lib/generators/tailwindcss/scaffold/templates/new.html.erb.tt +1 -1
- data/lib/tailwindcss/upstream.rb +14 -0
- data/lib/tailwindcss/version.rb +1 -1
- data/lib/tailwindcss-rails.rb +1 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '038ae043a6d8c8414cf375fd5568e3ccf1b46e87b005eba0dc0e44c11104f3a4'
|
4
|
+
data.tar.gz: 035753f9c82d2a6511a919bac50604648e8b7ce80fb03e1b598639a48fea9ea3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19e84fb4588a7699ba80755e326639a70f746b6c1c18c64b55f95848bcafa73945739cea763f13b1008ca31dc305dc20a89c10974b09c35359903e956873a708
|
7
|
+
data.tar.gz: 8767372e7858242440c529c3c6b6fd3f907f3b465a82fe721816b92463c35b8a431d3e60de16a54d088c710f88fa9e0b89f14c9896470862ba7174560a013ca2
|
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,
|
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,40 @@
|
|
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
|
+
|
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)))
|
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
|
32
|
+
|
33
|
+
See `bundle lock --help` output for details.
|
34
|
+
ERRMSG
|
35
|
+
exit 1
|
36
|
+
end
|
37
|
+
|
38
|
+
command = Shellwords.join([exe_path, ARGV].flatten)
|
39
|
+
puts "+ #{command}"
|
40
|
+
exec(command)
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%% end %>
|
5
5
|
|
6
6
|
<div class="flex justify-between items-center">
|
7
|
-
<h1 class="
|
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
|
|
@@ -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
|
data/lib/tailwindcss/version.rb
CHANGED
data/lib/tailwindcss-rails.rb
CHANGED
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.
|
4
|
+
version: 2.0.1
|
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-
|
11
|
+
date: 2021-12-19 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
|