Sha256: 2687b9ff2b20ea80dd761b9224419a86061eef4cec03e11128f63803fdffcc64

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

# frozen_string_literal: true

namespace :webpacker do
  desc "Install all JavaScript dependencies as specified via pnpm."
  task pnpm_install: [:environment] do
    valid_node_envs = ["test", "development", "production"]

    node_env = ENV.fetch("NODE_ENV") do
      valid_node_envs.include?(Rails.env) ? Rails.env : "production"
    end

    system({ "NODE_ENV" => node_env }, "pnpm i --frozen-lockfile --shamefully-hoist")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
webpacker-pnpm-1.2.1 lib/webpacker/tasks/pnpm_install.rake