Sha256: e56746f5953229dc34cfad77050b3d80946390b97d4500879facb5da12b0af01
Contents?: true
Size: 647 Bytes
Versions: 24
Compression:
Stored size: 647 Bytes
Contents
install_template_path = File.expand_path("../../install/template.rb", __dir__).freeze bin_path = ENV["BUNDLE_BIN"] || Rails.root.join("bin") namespace :webpacker do desc "Install Webpacker in this application" task install: [:check_node, :check_yarn] do |task| Webpacker::Configuration.installing = true prefix = task.name.split(/#|webpacker:install/).first if Rails::VERSION::MAJOR >= 5 exec "#{RbConfig.ruby} #{bin_path}/rails #{prefix}app:template LOCATION='#{install_template_path}'" else exec "#{RbConfig.ruby} #{bin_path}/rake #{prefix}rails:template LOCATION='#{install_template_path}'" end end end
Version data entries
24 entries across 24 versions & 1 rubygems