Sha256: 476605f3d6aff00d6656357f30de97149aef6da1ca8bbe86481e9716b91b6232

Contents?: true

Size: 615 Bytes

Versions: 29

Compression:

Stored size: 615 Bytes

Contents

require "webpacker/configuration"

namespace :webpacker do
  desc "Remove the webpack compiled output directory"
  task clobber: ["webpacker:verify_install", :environment] do
    Webpacker.clobber
    $stdout.puts "Removed webpack output path directory #{Webpacker.config.public_output_path}"
  end
end

skip_webpacker_clobber = %w(no false n f).include?(ENV["WEBPACKER_PRECOMPILE"])

unless skip_webpacker_clobber
  # Run clobber if the assets:clobber is run
  if Rake::Task.task_defined?("assets:clobber")
    Rake::Task["assets:clobber"].enhance do
      Rake::Task["webpacker:clobber"].invoke
    end
  end
end

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/lib/tasks/webpacker/clobber.rake
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/lib/tasks/webpacker/clobber.rake
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/lib/tasks/webpacker/clobber.rake
jetpacker-0.7.0 lib/tasks/webpacker/clobber.rake
webpacker-5.4.4 lib/tasks/webpacker/clobber.rake
jetpacker-0.6.0 lib/tasks/webpacker/clobber.rake
webpacker-5.4.3 lib/tasks/webpacker/clobber.rake
webpacker-5.4.2 lib/tasks/webpacker/clobber.rake
webpacker-5.4.1 lib/tasks/webpacker/clobber.rake
webpacker-5.4.0 lib/tasks/webpacker/clobber.rake
webpacker-5.3.0 lib/tasks/webpacker/clobber.rake
webpacker-5.2.2 lib/tasks/webpacker/clobber.rake
webpacker-6.0.0.beta.7 lib/tasks/webpacker/clobber.rake
webpacker-6.0.0.beta.6 lib/tasks/webpacker/clobber.rake
webpacker-6.0.0.beta.5 lib/tasks/webpacker/clobber.rake
webpacker-6.0.0.beta.4 lib/tasks/webpacker/clobber.rake
webpacker-6.0.0.beta.3 lib/tasks/webpacker/clobber.rake
jetpacker-0.5.0 lib/tasks/webpacker/clobber.rake
webpacker-6.0.0.beta.2 lib/tasks/webpacker/clobber.rake
webpacker-6.0.0.beta.1 lib/tasks/webpacker/clobber.rake