Add callback so v4 extensions can see when other extensions are activated
This commit is contained in:
parent
f3e2e8fdf5
commit
265f90e240
6 changed files with 63 additions and 1 deletions
|
@ -142,6 +142,7 @@ module Middleman
|
|||
# Search the root of the project for required files
|
||||
$LOAD_PATH.unshift(root)
|
||||
|
||||
::Middleman::Extension.clear_after_extension_callbacks
|
||||
run_hook :initialized
|
||||
|
||||
if config[:autoload_sprockets]
|
||||
|
@ -178,7 +179,7 @@ module Middleman
|
|||
run_hook :after_configuration
|
||||
|
||||
logger.debug "Loaded extensions:"
|
||||
self.extensions.each do |ext,_|
|
||||
self.extensions.each do |ext, klass|
|
||||
if ext.is_a?(Hash)
|
||||
ext.each do |k,_|
|
||||
logger.debug "== Extension: #{k}"
|
||||
|
@ -186,6 +187,10 @@ module Middleman
|
|||
else
|
||||
logger.debug "== Extension: #{ext}"
|
||||
end
|
||||
|
||||
if klass.is_a?(::Middleman::Extension)
|
||||
::Middleman::Extension.activated_extension(klass)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue