Sha256: f02bd5879ec55cd85002604b7ad81b754072cc556e42fd501745a79ea86ab842

Contents?: true

Size: 522 Bytes

Versions: 3

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

3 entries across 3 versions & 1 rubygems

Version Path
middleman-cli-4.3.0.rc.4 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.0.rc.3 fixtures/preview-server-hook-app/config.rb
middleman-cli-4.3.0.rc.2 fixtures/preview-server-hook-app/config.rb