Sha256: b55bba0bd71485c4c7c17f98fbba1c16fcd65798273f5486c1537f7eb2311c74

Contents?: true

Size: 619 Bytes

Versions: 6

Compression:

Stored size: 619 Bytes

Contents

INSTALLERS = {
  "Angular": :angular,
  "Elm": :elm,
  "React": :react,
  "Vue": :vue
}.freeze

namespace :webpacker do
  namespace :install do
    INSTALLERS.each do |name, task_name|
      desc "Install everything needed for #{name}"
      task task_name => ["webpacker:verify_install"] do
        template = File.expand_path("../install/#{task_name}.rb", __dir__)
        if Rails::VERSION::MAJOR >= 5
          exec "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{template}"
        else
          exec "#{RbConfig.ruby} ./bin/rake rails:template LOCATION=#{template}"
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

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