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.1.0 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.10 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.9 lib/vite_ruby/cli/clobber.rb
vite_ruby-4.0.0.alpha1 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.8 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.7 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.6 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.5 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.4 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.3 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.2 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.1 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.0 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.0.beta.3 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.0.beta.2 lib/vite_ruby/cli/clobber.rb
vite_ruby-3.0.0.beta.1 lib/vite_ruby/cli/clobber.rb
vite_ruby-2.0.0.beta.6 lib/vite_ruby/cli/clobber.rb
vite_ruby-2.0.0.beta.5 lib/vite_ruby/cli/clobber.rb
vite_ruby-2.0.0.beta.4 lib/vite_ruby/cli/clobber.rb
vite_ruby-2.0.0.beta.3 lib/vite_ruby/cli/clobber.rb