Sha256: 9f554ad62d64788361bce1282218a9fb5505af600e3d40fa4b00ae52b4a8bd63

Contents?: true

Size: 430 Bytes

Versions: 82

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

class ViteRuby::CLI::Clobber < Dry::CLI::Command
  desc 'Clear the Vite cache, temp files, and builds'

  current_env = ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'development'

  option(:mode, default: current_env, values: %w[development production test], aliases: ['m'], desc: 'The mode to use')

  def call(mode:, **)
    ViteRuby.env['VITE_RUBY_MODE'] = mode
    ViteRuby.commands.clobber
  end
end

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
vite_ruby-3.9.0 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.8.3 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.8.2 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.8.1 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.8.0 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.7.0 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.6.2 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.6.1 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.6.0 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.5.0 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.4.0 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.3.4 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.3.3 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.3.2 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.3.1 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.3.0 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.2.15 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.2.14 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.2.13 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.2.12 lib/vite_ruby/cli/clobber.rb