Sha256: f3d15b1caf6e4e71a46e6cd1bf88f2cb8d556a979cd36e363f415fa89ae6a0cf

Contents?: true

Size: 1.21 KB

Versions: 10

Compression:

Stored size: 1.21 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

if supported_platforms.none? { |supported_platform| Gem::Platform.match(supported_platform) }
  STDERR.puts(<<~ERRMSG)
    ERROR: tailwindcss-rails does not support the #{::Gem::Platform.local} 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 #{::Gem::Platform.local} 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 #{::Gem::Platform.local}
      bundle install

    See `bundle lock --help` output for details.
  ERRMSG
  exit 1
end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tailwindcss-rails-2.0.2 exe/tailwindcss
tailwindcss-rails-2.0.2-x86_64-linux exe/tailwindcss
tailwindcss-rails-2.0.2-x86_64-darwin exe/tailwindcss
tailwindcss-rails-2.0.2-x64-mingw32 exe/tailwindcss
tailwindcss-rails-2.0.2-arm64-darwin exe/tailwindcss
tailwindcss-rails-2.0.1 exe/tailwindcss
tailwindcss-rails-2.0.1-x86_64-linux exe/tailwindcss
tailwindcss-rails-2.0.1-x86_64-darwin exe/tailwindcss
tailwindcss-rails-2.0.1-x64-mingw32 exe/tailwindcss
tailwindcss-rails-2.0.1-arm64-darwin exe/tailwindcss