Sha256: 985ce72b3bb80e3822fa039ec082ba0fdf1c1f807f1e3e80f61f7c6acb32f769

Contents?: true

Size: 575 Bytes

Versions: 21

Compression:

Stored size: 575 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

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
    $stderr.puts "Yarn executable was not detected in the system."
    $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
    exit 1
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
neeto-commons-backend-1.0.109 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.108 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.107 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.106 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.105 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.104 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.103 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.102 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.101 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.100 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.99 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.98 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.97 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.96 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.95 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.94 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.93 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.92 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.91 lib/neeto_commons_backend/common_files/bin/yarn
neeto-commons-backend-1.0.90 lib/neeto_commons_backend/common_files/bin/yarn