Sha256: 6b97be3660ee4e0d36eb9b831c5a08995eb061240969df2abfaea2cf06cd18f4

Contents?: true

Size: 1.51 KB

Versions: 58

Compression:

Stored size: 1.51 KB

Contents

#! /usr/bin/env ruby
# because rubygems shims assume a gem's executables are Ruby

require "shellwords"
require "tailwindcss/upstream"

supported_platforms = Tailwindcss::Upstream::NATIVE_PLATFORMS.keys
platform = [:cpu, :os].map { |m| Gem::Platform.local.send(m) }.join("-")

if supported_platforms.none? { |supported_platform| Gem::Platform.match(supported_platform) }
  STDERR.puts(<<~ERRMSG)
    ERROR: tailwindcss-rails does not support the #{platform} platform
    Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation
  ERRMSG
  exit 1
end

exe_path = Dir.glob(File.join(__dir__, "*", "tailwindcss")).find do |f|
  Gem::Platform.match(File.basename(File.dirname(f)))
end
if exe_path.nil?
  STDERR.puts(<<~ERRMSG)
    ERROR: Cannot find the tailwindcss executable for #{platform} in #{__dir__}
    If you're using bundler, please make sure you're on the latest bundler version:

      gem install bundler
      bundle update --bundler

    Then make sure your lock file includes this platform by running:

      bundle lock --add-platform #{platform}
      bundle install

    See `bundle lock --help` output for details.
        
    If you're still seeing this message after taking those steps, try running
    `bundle config` and ensure `force_ruby_platform` isn't set to `true`. See
    https://github.com/rails/tailwindcss-rails#check-bundle_force_ruby_platform
    for more details.
  ERRMSG
  exit 1
end

command = Shellwords.join([exe_path, ARGV].flatten)
puts "+ #{command}"
exec(command)

Version data entries

58 entries across 58 versions & 2 rubygems

Version Path
tailwindcss-rails-2.0.12 exe/tailwindcss
tailwindcss-rails-2.0.12-x86_64-linux exe/tailwindcss
tailwindcss-rails-2.0.12-x86_64-darwin exe/tailwindcss
tailwindcss-rails-2.0.12-x64-mingw32 exe/tailwindcss
tailwindcss-rails-2.0.12-x64-mingw-ucrt exe/tailwindcss
tailwindcss-rails-2.0.12-arm64-darwin exe/tailwindcss
tailwindcss-rails-2.0.12-aarch64-linux exe/tailwindcss
tailwindcss-rails-2.0.11 exe/tailwindcss
tailwindcss-rails-2.0.11-x86_64-linux exe/tailwindcss
tailwindcss-rails-2.0.11-x86_64-darwin exe/tailwindcss
tailwindcss-rails-2.0.11-x64-mingw32 exe/tailwindcss
tailwindcss-rails-2.0.11-x64-mingw-ucrt exe/tailwindcss
tailwindcss-rails-2.0.11-arm64-darwin exe/tailwindcss
tailwindcss-rails-2.0.11-aarch64-linux exe/tailwindcss
tailwindcss-rails-plugable-2.0.12.pre.dev-x86_64-darwin exe/tailwindcss
tailwindcss-rails-plugable-2.0.12.pre.dev-x64-mingw-ucrt exe/tailwindcss
tailwindcss-rails-plugable-2.0.12.pre.dev-x64-mingw32 exe/tailwindcss
tailwindcss-rails-plugable-2.0.12.pre.dev exe/tailwindcss
tailwindcss-rails-plugable-2.0.12.pre.dev-arm64-darwin exe/tailwindcss
tailwindcss-rails-plugable-2.0.12.pre.dev-aarch64-linux exe/tailwindcss