2015-05-06 03:16:30 -04:00
|
|
|
set :layout, false
|
|
|
|
|
|
|
|
class MyFeature < Middleman::Extension
|
|
|
|
def initialize(app, options_hash = {}, &block)
|
|
|
|
super
|
|
|
|
|
|
|
|
app.before do
|
|
|
|
puts '/// before ///'
|
|
|
|
end
|
|
|
|
|
|
|
|
app.ready do
|
|
|
|
puts '/// ready ///'
|
|
|
|
end
|
|
|
|
|
2018-09-11 14:43:07 -04:00
|
|
|
app.before_build do |_builder|
|
|
|
|
puts '/// before_build ///'
|
2015-05-06 03:16:30 -04:00
|
|
|
end
|
|
|
|
|
2018-09-11 14:43:07 -04:00
|
|
|
app.after_build do |_builder|
|
|
|
|
puts '/// after_build ///'
|
2015-05-06 03:16:30 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def after_configuration
|
|
|
|
puts '/// after_configuration ///'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
::Middleman::Extensions.register(:my_feature, MyFeature)
|
|
|
|
|
|
|
|
activate :my_feature
|