Sha256: 3a1988f63ad055c5ecbd9834fafbb340aa1b40d613801b914163476eccc1c684

Contents?: true

Size: 1.06 KB

Versions: 19

Compression:

Stored size: 1.06 KB

Contents

installers = {
  "Angular": :angular,
  "Elm": :elm,
  "React": :react,
  "Vue": :vue,
  "Erb": :erb,
  "Coffee": :coffee,
  "Typescript": :typescript,
  "Stimulus": :stimulus
}.freeze

dependencies = {
  "Angular": [:typescript]
}

bin_path = ENV["BUNDLE_BIN"] || "./bin"

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__)
        base_path =
          if Rails::VERSION::MAJOR >= 5
            "#{RbConfig.ruby} #{bin_path}/rails app:template"
          else
            "#{RbConfig.ruby} #{bin_path}/rake rails:template"
          end

        dependencies[name] ||= []
        dependencies[name].each do |dependency|
          dependency_template = File.expand_path("../install/#{dependency}.rb", __dir__)
          system "#{base_path} LOCATION=#{dependency_template}"
        end

        exec "#{base_path} LOCATION=#{template}"
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/webpacker-4.0.7/lib/tasks/installers.rake
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/webpacker-4.0.7/lib/tasks/installers.rake
webpacker-4.0.7 lib/tasks/installers.rake
webpacker-4.0.6 lib/tasks/installers.rake
webpacker-4.0.5 lib/tasks/installers.rake
webpacker-4.0.4 lib/tasks/installers.rake
webpacker-4.0.3 lib/tasks/installers.rake
webpacker-4.0.2 lib/tasks/installers.rake
webpacker-4.0.1 lib/tasks/installers.rake
webpacker-4.0.0 lib/tasks/installers.rake
webpacker-4.0.0.rc.8 lib/tasks/installers.rake
webpacker-4.0.0.rc.7 lib/tasks/installers.rake
webpacker-4.0.0.rc.6 lib/tasks/installers.rake
webpacker-4.0.0.rc.5 lib/tasks/installers.rake
webpacker-4.0.0.rc.4 lib/tasks/installers.rake
webpacker-4.0.0.rc.3 lib/tasks/installers.rake
webpacker-4.0.0.rc.2 lib/tasks/installers.rake
webpacker-4.0.0.rc.1 lib/tasks/installers.rake
webpacker-4.0.0.pre.3 lib/tasks/installers.rake