Sha256: 8eee3ef8df7ea54ae2ead6ec20c7c038a62699cfc07605a06c6802258bf677ef

Contents?: true

Size: 455 Bytes

Versions: 7

Compression:

Stored size: 455 Bytes

Contents

WEBPACKER_APP_TEMPLATE_PATH = File.expand_path("../../install/template.rb", __dir__)

namespace :webpacker do
  desc "Install webpacker in this application"
  task install: [:check_node, :check_yarn] do
    if Rails::VERSION::MAJOR >= 5
      exec "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{WEBPACKER_APP_TEMPLATE_PATH}"
    else
      exec "#{RbConfig.ruby} ./bin/rake rails:template LOCATION=#{WEBPACKER_APP_TEMPLATE_PATH}"
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
webpacker-3.0.2 lib/tasks/webpacker/install.rake
webpacker-3.0.1 lib/tasks/webpacker/install.rake
webpacker-3.0.0 lib/tasks/webpacker/install.rake
webpacker-react-on-rails-3.0.0.rc.1 lib/tasks/webpacker/install.rake
webpacker-react-on-rails-2.0 lib/tasks/webpacker/install.rake
webpacker-2.0 lib/tasks/webpacker/install.rake
webpacker-1.2 lib/tasks/webpacker/install.rake