Sha256: 815be56c8030005f085bb45958ecc5cebcd49efe1079135e0c6d5a30f6bb346d

Contents?: true

Size: 557 Bytes

Versions: 2

Compression:

Stored size: 557 Bytes

Contents

require "webpacker/configuration"

namespace :webpacker do
  desc "Remove the webpack compiled output directory"
  task clobber: ["webpacker:verify_install", :environment] do
    output_path = Webpacker::Configuration.output_path
    FileUtils.rm_r(output_path) if File.exist?(output_path)
    $stdout.puts "Removed webpack output path directory #{output_path}"
  end
end

# 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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webpacker-react-on-rails-3.0.0.rc.1 lib/tasks/webpacker/clobber.rake
webpacker-react-on-rails-2.0 lib/tasks/webpacker/clobber.rake