Sha256: def6dd15e92c1067eb5a85dd24841ffdbd0ae36a7d4f4a9b9934acbde048f5f1
Contents?: true
Size: 595 Bytes
Versions: 30
Compression:
Stored size: 595 Bytes
Contents
namespace :webpacker do desc "Support for older Rails versions. Install all JavaScript dependencies as specified via Yarn" task :yarn_install do valid_node_envs = %w[test development production] node_env = ENV.fetch("NODE_ENV") do valid_node_envs.include?(Rails.env) ? Rails.env : "production" end Dir.chdir(Rails.root) do yarn_flags = if `yarn --version`.start_with?("1") "--no-progress --frozen-lockfile" else "--immutable" end system({ "NODE_ENV" => node_env }, "yarn install #{yarn_flags}") end end end
Version data entries
30 entries across 30 versions & 2 rubygems