Sha256: 3a1df29389bd59d7fd63fe1cbc744e6c38e52ec155a6ad4ca63bd04488159669
Contents?: true
Size: 659 Bytes
Versions: 31
Compression:
Stored size: 659 Bytes
Contents
# frozen_string_literal: true namespace :yarn do desc "Install all JavaScript dependencies as specified via Yarn" task :install do # Install only production deps when for not usual envs. valid_node_envs = %w[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 }, "./bin/yarn install --no-progress") end end # Run Yarn prior to Sprockets assets precompilation, so dependencies are available for use. if Rake::Task.task_defined?("assets:precompile") Rake::Task["assets:precompile"].enhance [ "yarn:install" ] end
Version data entries
31 entries across 31 versions & 3 rubygems