Sha256: 8a0bf687835b08b5745e71b9aaced20eb11136650dacbd9e595592dfe7f75498
Contents?: true
Size: 710 Bytes
Versions: 47
Compression:
Stored size: 710 Bytes
Contents
$stdout.sync = true require "webpacker/configuration" namespace :webpacker do desc "Remove old compiled webpacks" task :clean, [:keep, :age] => ["webpacker:verify_install", :environment] do |_, args| Webpacker.ensure_log_goes_to_stdout do Webpacker.clean(Integer(args.keep || 2), Integer(args.age || 3600)) end end end skip_webpacker_clean = %w(no false n f).include?(ENV["WEBPACKER_PRECOMPILE"]) unless skip_webpacker_clean # 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 else Rake::Task.define_task("assets:clean" => "webpacker:clean") end end
Version data entries
47 entries across 47 versions & 4 rubygems