Sha256: e6cc6fd5796e53c4f09fe3cfe547b186201afea5ea492620e94f531a6bd9a973

Contents?: true

Size: 544 Bytes

Versions: 10

Compression:

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

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/lib/tasks/webpacker/yarn_install.rake
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/lib/tasks/webpacker/yarn_install.rake
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/lib/tasks/webpacker/yarn_install.rake
webpacker-5.4.4 lib/tasks/webpacker/yarn_install.rake
webpacker-5.4.3 lib/tasks/webpacker/yarn_install.rake
webpacker-5.4.2 lib/tasks/webpacker/yarn_install.rake
webpacker-5.4.1 lib/tasks/webpacker/yarn_install.rake
webpacker-5.4.0 lib/tasks/webpacker/yarn_install.rake
webpacker-5.3.0 lib/tasks/webpacker/yarn_install.rake
webpacker-5.2.2 lib/tasks/webpacker/yarn_install.rake