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