Sha256: 65d6b18345c88180e7c2185d6111e4b9e60539239f108c6c0373f875311f1b9c

Contents?: true

Size: 470 Bytes

Versions: 1

Compression:

Stored size: 470 Bytes

Contents

require 'middleman-core'
require 'middleman-webp/converter'

module Middleman
  class WebPExtension < Extension
    option(:conversion_options, {},
           'Custom conversion options for cwebp/gif2webp')
    option(:ignore, [], 'Ignores files with matching paths')
    def initialize(app, options_hash = {}, &block)
      super

      app.after_build do |builder|
        Middleman::WebP::Converter.new(app, options_hash, builder).convert
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
middleman-webp-0.2.4 lib/middleman-webp/extension.rb