Sha256: ebaf833cf30e04f4fedcc1057059b50faac31d661f5565bb05f32cc97af95819

Contents?: true

Size: 512 Bytes

Versions: 11

Compression:

Stored size: 512 Bytes

Contents

require "webpacker/mtime_strategy"
require "webpacker/digest_strategy"

module Webpacker
  class CompilerStrategy
    def self.from_config
      strategy_from_config = Webpacker.config.compiler_strategy

      case strategy_from_config
      when "mtime"
        Webpacker::MtimeStrategy.new
      when "digest"
        Webpacker::DigestStrategy.new
      else
        raise "Unknown strategy '#{strategy_from_config}'. " \
              "Available options are 'mtime' and 'digest'."
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
shakapacker-6.6.0 lib/webpacker/compiler_strategy.rb
shakapacker-6.5.6 lib/webpacker/compiler_strategy.rb
shakapacker-6.5.5 lib/webpacker/compiler_strategy.rb
shakapacker-6.5.4 lib/webpacker/compiler_strategy.rb
shakapacker-6.5.3 lib/webpacker/compiler_strategy.rb
shakapacker-6.5.2 lib/webpacker/compiler_strategy.rb
shakapacker-6.5.1 lib/webpacker/compiler_strategy.rb
shakapacker-6.5.0 lib/webpacker/compiler_strategy.rb
shakapacker-6.4.1 lib/webpacker/compiler_strategy.rb
shakapacker-6.4.0 lib/webpacker/compiler_strategy.rb
shakapacker-6.3.0 lib/webpacker/compiler_strategy.rb