Sha256: 8e7be34d183e4566e612f4c37a136331e944b9995567644a6ec09ebf9301ad87

Contents?: true

Size: 465 Bytes

Versions: 23

Compression:

Stored size: 465 Bytes

Contents

class Webpacker::Commands
  delegate :config, :compiler, :manifest, to: :@webpacker

  def initialize(webpacker)
    @webpacker = webpacker
  end

  def clobber
    config.public_output_path.rmtree if config.public_output_path.exist?
    config.cache_path.rmtree if config.cache_path.exist?
  end

  def bootstrap
    config.refresh
    manifest.refresh
  end

  def compile
    compiler.compile.tap do |success|
      manifest.refresh if success
    end
  end
end

Version data entries

23 entries across 23 versions & 3 rubygems

Version Path
webpacker-3.6.0 lib/webpacker/commands.rb
webpacker-jets-3.2.101 lib/webpacker/commands.rb
webpacker-jets-3.2.100 lib/webpacker/commands.rb
webpacker-3.5.5 lib/webpacker/commands.rb
webpacker-3.5.3 lib/webpacker/commands.rb
webpacker-3.5.2 lib/webpacker/commands.rb
webpacker-3.5.1 lib/webpacker/commands.rb
webpacker-3.5.0 lib/webpacker/commands.rb
webpacker-3.4.3 lib/webpacker/commands.rb
webpacker-4.0.0.pre.pre.2 lib/webpacker/commands.rb
webpacker-4.0.0.pre.pre.1 lib/webpacker/commands.rb
webpacker-3.4.1 lib/webpacker/commands.rb
webpacker-3.4.0 lib/webpacker/commands.rb
webpacker-3.3.1 lib/webpacker/commands.rb
webpacker-3.3.0 lib/webpacker/commands.rb
webpacker-3.2.2 lib/webpacker/commands.rb
webpacker-3.2.1 lib/webpacker/commands.rb
webpacker-3.2.0 lib/webpacker/commands.rb
webpacker-3.1.1 lib/webpacker/commands.rb
webpacker-3.1.0 lib/webpacker/commands.rb