Sha256: 18878874fcd61d691f388bc3273f38986c4d588f0bba8de0d9a8d2e41723a7a3

Contents?: true

Size: 529 Bytes

Versions: 11

Compression:

Stored size: 529 Bytes

Contents

#!/usr/bin/env ruby

APP_ROOT = File.expand_path("..", __dir__)
Dir.chdir(APP_ROOT) do
  yarn = ENV["PATH"].split(File::PATH_SEPARATOR)
    .select { |dir| File.expand_path(dir) != __dir__ }
    .product(["yarn", "yarnpkg", "yarn.cmd", "yarn.ps1"])
    .map { |dir, file| File.expand_path(file, dir) }
    .find { |file| File.executable?(file) }

  if yarn
    exec yarn, *ARGV
  else
    warn "Yarn executable was not detected in the system."
    warn "Download Yarn at https://yarnpkg.com/en/docs/install"
    exit 1
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
rails_app-0.9.0 lib/rails_app/template/bin/yarn
rails_app-0.8.1 lib/rails_app/template/bin/yarn
rails_app-0.8.0 lib/rails_app/template/bin/yarn
rails_app-0.7.0 lib/rails_app/template/bin/yarn
rails_app-0.6.0 lib/rails_app/template/bin/yarn
rails_app-0.5.0 lib/rails_app/template/bin/yarn
rails_app-0.4.0 lib/rails_app/template/bin/yarn
rails_app-0.3.0 lib/rails_app/template/bin/yarn
rails_app-0.2.0 lib/rails_app/template/bin/yarn
rails_app-0.1.0 lib/rails_app/template/bin/yarn
suspenders-20230113.0 templates/bin_yarn