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

Version Path
shakapacker-6.3.0 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.3.0.pre.rc.1 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.2.1 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.2.0 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.1.1 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.1.0 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.1.0.beta.0 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.0.2 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.0.1 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.0.0 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.0.0.rc.14 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.0.0.rc.13 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.0.0.rc.12 lib/tasks/webpacker/yarn_install.rake
shakapacker-6.0.0.rc.6 lib/tasks/webpacker/yarn_install.rake
webpacker-6.0.0.rc.6 lib/tasks/webpacker/yarn_install.rake
webpacker-6.0.0.rc.5 lib/tasks/webpacker/yarn_install.rake
webpacker-6.0.0.rc.4 lib/tasks/webpacker/yarn_install.rake
webpacker-6.0.0.rc.3 lib/tasks/webpacker/yarn_install.rake
webpacker-6.0.0.rc.2 lib/tasks/webpacker/yarn_install.rake
webpacker-6.0.0.rc.1 lib/tasks/webpacker/yarn_install.rake