Sha256: fc5dd6fbbe0a3d200b701b0b184e81c8a1fa94a2f46f54792a86576323f7a627

Contents?: true

Size: 483 Bytes

Versions: 3

Compression:

Stored size: 483 Bytes

Contents

$stdout.sync = true

require "webpacker/configuration"

namespace :webpacker do
  desc "Remove old compiled webpacks"
  task :clean, [:keep] => ["webpacker:verify_install", :environment] do |_, args|
    Webpacker.ensure_log_goes_to_stdout do
      Webpacker.clean(Integer(args.keep || 2))
    end
  end
end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
webpacker-4.3.0 lib/tasks/webpacker/clean.rake
webpacker-4.2.2 lib/tasks/webpacker/clean.rake
webpacker-4.2.1 lib/tasks/webpacker/clean.rake