Sha256: 83a9cd2148f47be651dbaf407fc5bec85d78d1f8630a1560c45c1ebdba9d9885

Contents?: true

Size: 641 Bytes

Versions: 1

Compression:

Stored size: 641 Bytes

Contents

require "webpacker_helpers/configuration"

namespace :webpacker_helpers do
  desc "Remove the webpack compiled output directory as defined in config/webpack/paths.yml"
  task clobber: ["webpacker_helpers:verify_install", :environment] do
    output_path = WebpackerHelpers::Configuration.webpack_public_output_dir
    FileUtils.rm_r(output_path) if File.exist?(output_path)
    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_helpers:clobber"].invoke
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
webpacker_helpers-3.0.0.beta.1 lib/tasks/webpacker_lite/clobber.rake