Sha256: 4f4b7bbe4172b3a7de8565d69e1ea0d086faa802804031fdaea023eaf50e7e33

Contents?: true

Size: 662 Bytes

Versions: 16

Compression:

Stored size: 662 Bytes

Contents

$stdout.sync = true

require "shakapacker/configuration"

namespace :shakapacker do
  desc "Remove old compiled bundles"
  task :clean, [:keep, :age] => ["shakapacker:verify_install", :environment] do |_, args|
    Shakapacker.ensure_log_goes_to_stdout do
      Shakapacker.clean(Integer(args.keep || 2), Integer(args.age || 3600))
    end
  end
end

if Shakapacker.config.shakapacker_precompile?
  # Run clean if the assets:clean is run
  if Rake::Task.task_defined?("assets:clean")
    Rake::Task["assets:clean"].enhance do
      Rake::Task["shakapacker:clean"].invoke
    end
  else
    Rake::Task.define_task("assets:clean" => "shakapacker:clean")
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
shakapacker-8.0.2 lib/tasks/shakapacker/clean.rake
shakapacker-8.0.1 lib/tasks/shakapacker/clean.rake
shakapacker-7.2.3 lib/tasks/shakapacker/clean.rake
shakapacker-7.3.0.beta.1 lib/tasks/shakapacker/clean.rake
shakapacker-7.2.2 lib/tasks/shakapacker/clean.rake
shakapacker-7.2.1 lib/tasks/shakapacker/clean.rake
shakapacker-7.2.0 lib/tasks/shakapacker/clean.rake
shakapacker-7.2.0.rc.0 lib/tasks/shakapacker/clean.rake
shakapacker-7.1.0 lib/tasks/shakapacker/clean.rake
shakapacker-7.0.3 lib/tasks/shakapacker/clean.rake
shakapacker-7.0.2 lib/tasks/shakapacker/clean.rake
shakapacker-7.0.1 lib/tasks/shakapacker/clean.rake
shakapacker-7.0.0 lib/tasks/shakapacker/clean.rake
shakapacker-7.0.0.rc.2 lib/tasks/shakapacker/clean.rake
shakapacker-7.0.0.rc.1 lib/tasks/shakapacker/clean.rake
shakapacker-7.0.0.rc.0 lib/tasks/shakapacker/clean.rake