Sha256: a28ea58c9e8ae1ce28dbc8606bd631be047135aceea13d32e13db93e90a6ba28

Contents?: true

Size: 646 Bytes

Versions: 10

Compression:

Stored size: 646 Bytes

Contents

install_template_path = File.expand_path("../../install/template.rb", __dir__).freeze
bin_path = ENV["BUNDLE_BIN"] || Rails.root.join("bin")

namespace :shakapacker do
  desc "Install Shakapacker in this application"
  task install: [:check_node] do |task|
    Shakapacker::Configuration.installing = true

    prefix = task.name.split(/#|shakapacker: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

10 entries across 10 versions & 1 rubygems

Version Path
shakapacker-8.2.0 lib/tasks/shakapacker/install.rake
shakapacker-8.1.0 lib/tasks/shakapacker/install.rake
shakapacker-8.0.2 lib/tasks/shakapacker/install.rake
shakapacker-8.0.1 lib/tasks/shakapacker/install.rake
shakapacker-7.2.3 lib/tasks/shakapacker/install.rake
shakapacker-7.3.0.beta.1 lib/tasks/shakapacker/install.rake
shakapacker-7.2.2 lib/tasks/shakapacker/install.rake
shakapacker-7.2.1 lib/tasks/shakapacker/install.rake
shakapacker-7.2.0 lib/tasks/shakapacker/install.rake
shakapacker-7.2.0.rc.0 lib/tasks/shakapacker/install.rake