Sha256: f03a8128209afc9bdc9501d4973918193473cdc8275d92a986344897b00f69c4

Contents?: true

Size: 477 Bytes

Versions: 3

Compression:

Stored size: 477 Bytes

Contents

require "middleman-core"

module Middleman

  # Middleman extension entry point
  module Imageoptim
    class << self
      def registered(app, options_hash = {}, &block)
        options = Middleman::Imageoptim::Options.new(options_hash)
        yield options.user_options if block_given?

        app.after_build {|builder|
          Middleman::Imageoptim::Optimizer.new(app, builder, options).optimize!
        }
      end
      alias :included :registered
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
middleman-imageoptim-0.1.3 lib/middleman-imageoptim/extension.rb
middleman-imageoptim-0.1.2 lib/middleman-imageoptim/extension.rb
middleman-imageoptim-0.1.1 lib/middleman-imageoptim/extension.rb