Sha256: d614bad3563969191cc03237387abb6b89a24da75e445c4948e8be28ffaeac5d

Contents?: true

Size: 522 Bytes

Versions: 40

Compression:

Stored size: 522 Bytes

Contents

set :layout, false

class MyFeature < Middleman::Extension
  def initialize(app, options_hash = {}, &block)
    super

    app.before_server do |server_information|
      puts "/// #{server_information.listeners.first} ///"
      puts "/// #{server_information.port} ///"
      puts "/// #{server_information.server_name} ///"
      puts "/// #{server_information.site_addresses.first} ///"
      puts "/// ### END ### ///"
    end
  end
end

::Middleman::Extensions.register(:my_feature, MyFeature)

activate :my_feature

Version data entries

40 entries across 40 versions & 3 rubygems

Version Path
middleman-cli-4.5.1 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.5.0 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.4.3 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.4.2 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.4.0 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.11 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.10 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.8 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.7 fixtures/preview-server-hook-app/config.rb
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/middleman-cli-4.3.3/fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.6 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.5 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.4 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.3 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.2 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.1 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.0 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.0.rc.1 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.2.1 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.2.0 fixtures/preview-server-hook-app/config.rb