tailwindcss-ruby 4.0.0.beta.9-x86_64-linux-gnu

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5fd996ff6a3bb853f9c35e7b07ccb86320d06713219e1a2ad75b82bc87ec8899
4
+ data.tar.gz: eb7d9f34a84ea69e1a69acc5247e341c91db0a03d9ada90053f5e371421ce8c0
5
+ SHA512:
6
+ metadata.gz: 435eca761f758669a149cd2fc00d9c6c8cc025d57997e55709e4ea1aa3f59f488d005afbacc6c6558b7681579e4b63ff558b14c36bfd062c7004386e0de50360
7
+ data.tar.gz: 017f65cf2507c6d14bb066a687e35da46565a64a3774710e2e9b812e9cca221f25ec759e3bc43ba1df8e5e7ddcfbb39523a7593ab8e9066267494c3a64c65fb3
@@ -0,0 +1,26 @@
1
+ tailwindcss-ruby may redistribute executables from the https://github.com/tailwindlabs/tailwindcss project
2
+
3
+ The license for that software can be found at https://github.com/tailwindlabs/tailwindcss/blob/master/LICENSE which is reproduced here for your convenience:
4
+
5
+ MIT License
6
+
7
+ Copyright (c) Adam Wathan <adam.wathan@gmail.com>
8
+ Copyright (c) Jonathan Reinink <jonathan@reinink.ca>
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020-2024 Mike Dalessio, David Heinemeier Hansson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,159 @@
1
+ # Tailwindcss::Ruby
2
+
3
+ A self-contained `tailwindcss` executable, wrapped up in a ruby gem. That's it. Nothing else.
4
+
5
+ If you're looking to leverage tailwindcss in your Rails project, please see https://github.com/rails/tailwindcss-rails for integration that is supported by the Rails team.
6
+
7
+
8
+ ## Installation
9
+
10
+ This gem wraps [the standalone executable version](https://tailwindcss.com/blog/standalone-cli) of the Tailwind CSS v3 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.
11
+
12
+ Supported platforms are:
13
+
14
+ - arm64-darwin (macos-arm64)
15
+ - x64-mingw32 (windows-x64)
16
+ - x64-mingw-ucr (windows-x64)
17
+ - x86_64-darwin (macos-x64)
18
+ - x86_64-linux (linux-x64)
19
+ - aarch64-linux (linux-arm64)
20
+ - arm-linux (linux-armv7)
21
+
22
+ Install the gem and add to the application's Gemfile by executing:
23
+
24
+ ```bash
25
+ bundle add tailwindcss-ruby
26
+ ```
27
+
28
+ If bundler is not being used to manage dependencies, install the gem by executing:
29
+
30
+ ```bash
31
+ gem install tailwindcss-ruby
32
+ ```
33
+
34
+ ### Using a local installation of `tailwindcss`
35
+
36
+ If you are not able to use the vendored standalone executables (for example, if you're on an unsupported platform), you can use a [local installation](https://tailwindcss.com/docs/installation) of the `tailwindcss` executable by setting an environment variable named `TAILWINDCSS_INSTALL_DIR` to the directory path containing the executable.
37
+
38
+ For example, if you've installed `tailwindcss` so that the executable is found at `/path/to/node_modules/bin/tailwindcss`, then you should set your environment variable like so:
39
+
40
+ ``` sh
41
+ TAILWINDCSS_INSTALL_DIR=/path/to/node_modules/bin
42
+ ```
43
+
44
+ or, for relative paths like `./node_modules/.bin/tailwindcss`:
45
+
46
+ ``` sh
47
+ TAILWINDCSS_INSTALL_DIR=node_modules/.bin
48
+ ```
49
+
50
+
51
+ ## Versioning
52
+
53
+ This gem will always have the same version number as the underlying TailwindCSS release. For example, the gem with version v3.4.13 will package upstream TailwindCSS v3.4.13.
54
+
55
+ If there ever needs to be multiple releases for the same version of TailwindCSS, the version will contain an additional digit. For example, if we re-released TailwindCSS v3.4.13, it might be shipped in gem version v3.4.13.1 or v3.4.13.2.
56
+
57
+
58
+ ## Usage
59
+
60
+ ### Ruby
61
+
62
+ The gem makes available `Tailwindcss::Ruby.executable` which is the path to the vendored standalone executable.
63
+
64
+ ``` ruby
65
+ require "tailwindcss/ruby"
66
+ Tailwindcss::Ruby.executable
67
+ # => "/path/to/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/tailwindcss-ruby-0.1.0-x86_64-linux/exe/x86_64-linux/tailwindcss"
68
+ ```
69
+
70
+
71
+ ### Command line
72
+
73
+ This gem provides an executable `tailwindcss` shim that will run the vendored standalone executable.
74
+
75
+ ``` bash
76
+ # where is the shim?
77
+ $ bundle exec which tailwindcss
78
+ /path/to/installs/ruby/3.3/bin/tailwindcss
79
+
80
+ # run the actual executable through the shim
81
+ $ bundle exec tailwindcss --help
82
+ ["/path/to/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/tailwindcss-ruby-0.1.0-x86_64-linux/exe/x86_64-linux/tailwindcss", "--help"]
83
+
84
+ tailwindcss v3.4.3
85
+
86
+ Usage:
87
+ tailwindcss [--input input.css] [--output output.css] [--watch] [options...]
88
+ tailwindcss init [--full] [--postcss] [options...]
89
+
90
+ Commands:
91
+ init [options]
92
+
93
+ Options:
94
+ -i, --input Input file
95
+ -o, --output Output file
96
+ -w, --watch Watch for changes and rebuild as needed
97
+ -p, --poll Use polling instead of filesystem events when watching
98
+ --content Content paths to use for removing unused classes
99
+ --postcss Load custom PostCSS configuration
100
+ -m, --minify Minify the output
101
+ -c, --config Path to a custom config file
102
+ --no-autoprefixer Disable autoprefixer
103
+ -h, --help Display usage information
104
+ ```
105
+
106
+
107
+ ## Troubleshooting
108
+
109
+ ### `ERROR: Cannot find the tailwindcss executable` for supported platform
110
+
111
+ Some users are reporting this error even when running on one of the supported native platforms:
112
+
113
+ - arm64-darwin
114
+ - x64-mingw32
115
+ - x64-mingw-ucrt
116
+ - x86_64-darwin
117
+ - x86_64-linux
118
+ - aarch64-linux
119
+
120
+ #### Check Bundler PLATFORMS
121
+
122
+ 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:
123
+
124
+ ``` sh
125
+ bundle lock --add-platform <platform-name>
126
+ ```
127
+
128
+ and re-bundle.
129
+
130
+
131
+ #### Check BUNDLE_FORCE_RUBY_PLATFORM
132
+
133
+ Another common cause of this is that bundler is configured to always use the "ruby" platform via the
134
+ `BUNDLE_FORCE_RUBY_PLATFORM` config parameter being set to `true`. Please remove this configuration:
135
+
136
+ ``` sh
137
+ bundle config unset force_ruby_platform
138
+ # or
139
+ bundle config set --local force_ruby_platform false
140
+ ```
141
+
142
+ and re-bundle.
143
+
144
+ See https://bundler.io/man/bundle-config.1.html for more information.
145
+
146
+
147
+ ## Contributing
148
+
149
+ Bug reports and pull requests are welcome on GitHub at https://github.com/flavorjones/tailwindcss-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/flavorjones/tailwindcss-ruby/blob/main/CODE_OF_CONDUCT.md).
150
+
151
+ ## License
152
+
153
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
154
+
155
+ Tailwind CSS is [released under the MIT License](https://github.com/tailwindlabs/tailwindcss/blob/next/LICENSE).
156
+
157
+ ## Code of Conduct
158
+
159
+ Everyone interacting in the Tailwindcss::Ruby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/flavorjones/tailwindcss-ruby/blob/main/CODE_OF_CONDUCT.md).
data/exe/tailwindcss ADDED
@@ -0,0 +1,19 @@
1
+ #! /usr/bin/env ruby
2
+ # because rubygems shims assume a gem's executables are Ruby
3
+
4
+ require "tailwindcss/ruby"
5
+
6
+ begin
7
+ command = [Tailwindcss::Ruby.executable, *ARGV]
8
+ puts command.inspect
9
+ if Gem.win_platform?
10
+ # use system rather than exec as exec inexplicably fails to find the executable on Windows
11
+ # see related https://github.com/rubys/sprockets-esbuild/pull/4
12
+ system(*command, exception: true)
13
+ else
14
+ exec(*command)
15
+ end
16
+ rescue Tailwindcss::Ruby::UnsupportedPlatformException, Tailwindcss::Ruby::ExecutableNotFoundException => e
17
+ STDERR.puts("ERROR: " + e.message)
18
+ exit 1
19
+ end
Binary file
@@ -0,0 +1,19 @@
1
+ module Tailwindcss
2
+ module Ruby
3
+ module Upstream
4
+ VERSION = "v4.0.0-beta.9"
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
+ "x64-mingw-ucrt" => "tailwindcss-windows-x64.exe",
11
+ "x86_64-darwin" => "tailwindcss-macos-x64",
12
+ "x86_64-linux-gnu" => "tailwindcss-linux-x64",
13
+ "x86_64-linux-musl" => "tailwindcss-linux-x64-musl",
14
+ "aarch64-linux-gnu" => "tailwindcss-linux-arm64",
15
+ "aarch64-linux-musl" => "tailwindcss-linux-arm64-musl",
16
+ }
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tailwindcss
4
+ module Ruby
5
+ VERSION = "4.0.0.beta.9"
6
+ end
7
+ end
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "ruby/version"
4
+ require_relative "ruby/upstream"
5
+
6
+ module Tailwindcss
7
+ module Ruby
8
+ DEFAULT_DIR = File.expand_path(File.join(__dir__, "..", "..", "exe"))
9
+ GEM_NAME = "tailwindcss-ruby"
10
+
11
+ # raised when the host platform is not supported by upstream tailwindcss's binary releases
12
+ class UnsupportedPlatformException < StandardError
13
+ end
14
+
15
+ # raised when the tailwindcss executable could not be found where we expected it to be
16
+ class ExecutableNotFoundException < StandardError
17
+ end
18
+
19
+ # raised when TAILWINDCSS_INSTALL_DIR does not exist
20
+ class DirectoryNotFoundException < StandardError
21
+ end
22
+
23
+ class << self
24
+ def platform
25
+ [:cpu, :os].map { |m| Gem::Platform.local.send(m) }.join("-")
26
+ end
27
+
28
+ def executable(exe_path: DEFAULT_DIR)
29
+ tailwindcss_install_dir = ENV["TAILWINDCSS_INSTALL_DIR"]
30
+ if tailwindcss_install_dir
31
+ if File.directory?(tailwindcss_install_dir)
32
+ warn "NOTE: using TAILWINDCSS_INSTALL_DIR to find tailwindcss executable: #{tailwindcss_install_dir}"
33
+ exe_path = tailwindcss_install_dir
34
+ exe_file = File.expand_path(File.join(tailwindcss_install_dir, "tailwindcss"))
35
+ else
36
+ raise DirectoryNotFoundException, <<~MESSAGE
37
+ TAILWINDCSS_INSTALL_DIR is set to #{tailwindcss_install_dir}, but that directory does not exist.
38
+ MESSAGE
39
+ end
40
+ else
41
+ if Tailwindcss::Ruby::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match_gem?(Gem::Platform.new(p), GEM_NAME) }
42
+ raise UnsupportedPlatformException, <<~MESSAGE
43
+ #{GEM_NAME} does not support the #{platform} platform
44
+ See https://github.com/flavorjones/tailwindcss-ruby#using-a-local-installation-of-tailwindcss
45
+ for more details.
46
+ MESSAGE
47
+ end
48
+
49
+ exe_file = Dir.glob(File.expand_path(File.join(exe_path, "*", "tailwindcss"))).find do |f|
50
+ Gem::Platform.match_gem?(Gem::Platform.new(File.basename(File.dirname(f))), GEM_NAME)
51
+ end
52
+ end
53
+
54
+ if exe_file.nil? || !File.exist?(exe_file)
55
+ raise ExecutableNotFoundException, <<~MESSAGE
56
+ Cannot find the tailwindcss executable for #{platform} in #{exe_path}
57
+
58
+ If you're using bundler, please make sure you're on the latest bundler version:
59
+
60
+ gem install bundler
61
+ bundle update --bundler
62
+
63
+ Then make sure your lock file includes this platform by running:
64
+
65
+ bundle lock --add-platform #{platform}
66
+ bundle install
67
+
68
+ See `bundle lock --help` output for details.
69
+
70
+ If you're still seeing this message after taking those steps, try running
71
+ `bundle config` and ensure `force_ruby_platform` isn't set to `true`. See
72
+ https://github.com/flavorjones/tailwindcss-ruby#check-bundle_force_ruby_platform
73
+ for more details.
74
+ MESSAGE
75
+ end
76
+
77
+ exe_file
78
+ end
79
+ end
80
+ end
81
+ end
metadata ADDED
@@ -0,0 +1,55 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tailwindcss-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 4.0.0.beta.9
5
+ platform: x86_64-linux-gnu
6
+ authors:
7
+ - Mike Dalessio
8
+ - David Heinemeier Hansson
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2025-01-10 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A self-contained `tailwindcss` executable, wrapped up in a ruby gem.
14
+ That's it. Nothing else.
15
+ email:
16
+ - mike.dalessio@gmail.com
17
+ - david@loudthinking.com
18
+ executables:
19
+ - tailwindcss
20
+ extensions: []
21
+ extra_rdoc_files: []
22
+ files:
23
+ - LICENSE-DEPENDENCIES
24
+ - LICENSE.txt
25
+ - README.md
26
+ - exe/tailwindcss
27
+ - exe/x86_64-linux-gnu/tailwindcss
28
+ - lib/tailwindcss/ruby.rb
29
+ - lib/tailwindcss/ruby/upstream.rb
30
+ - lib/tailwindcss/ruby/version.rb
31
+ homepage: https://github.com/flavorjones/tailwindcss-ruby
32
+ licenses:
33
+ - MIT
34
+ metadata:
35
+ source_code_uri: https://github.com/flavorjones/tailwindcss-ruby
36
+ changelog_uri: https://github.com/flavorjones/tailwindcss-ruby/blob/main/CHANGELOG.md
37
+ rubygems_mfa_required: 'true'
38
+ rdoc_options: []
39
+ require_paths:
40
+ - lib
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 3.0.0
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ requirements: []
52
+ rubygems_version: 3.6.2
53
+ specification_version: 4
54
+ summary: A self-contained `tailwindcss` executable.
55
+ test_files: []