Sha256: 2e05eb60a5120a8d27d9c498d55ad6800c14c86c74e0b315716f3773b82ad2dc

Contents?: true

Size: 579 Bytes

Versions: 12

Compression:

Stored size: 579 Bytes

Contents

# frozen_string_literal: true

namespace :vite do
  desc 'Remove the vite build output directory'
  task clobber: [:'vite:verify_install', :environment] do
    ViteRails.clobber
    $stdout.puts "Removed vite build output directory #{ ViteRails.config.build_output_dir }"
  end
end

skip_vite_clobber = %w[no false n f].include?(ENV['VITE_RUBY_PRECOMPILE'])

unless skip_vite_clobber
  # Run clobber if the assets:clobber is run
  if Rake::Task.task_defined?('assets:clobber')
    Rake::Task['assets:clobber'].enhance do
      Rake::Task['vite:clobber'].invoke
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
vite_rails-1.0.12 lib/tasks/vite/clobber.rake
vite_rails-1.0.11 lib/tasks/vite/clobber.rake
vite_rails-1.0.10 lib/tasks/vite/clobber.rake
vite_rails-1.0.9 lib/tasks/vite/clobber.rake
vite_rails-1.0.8 lib/tasks/vite/clobber.rake
vite_rails-1.0.7 lib/tasks/vite/clobber.rake
vite_rails-1.0.6 lib/tasks/vite/clobber.rake
vite_rails-1.0.5 lib/tasks/vite/clobber.rake
vite_rails-1.0.4 lib/tasks/vite/clobber.rake
vite_rails-1.0.3 lib/tasks/vite/clobber.rake
vite_rails-1.0.2 lib/tasks/vite/clobber.rake
vite_rails-1.0.1 lib/tasks/vite/clobber.rake