When Middleman starts, it reads config.rb and runs all extensions two times. The first time through, it runs in config mode (app.mode? :config). The second time through it runs in either build or server mode (app.mode? :build or app.mode? :server, respectively). The config mode is intended to be used for registering cli flags. Since this extension doesn't currently contribute any cli flags, no processing is necessary in this mode. (In the future, if this extension does contribute cli flags, that logic would still be separate from normal processing).
In the constructor is called, return immediately in config mode. This will prevent the callbacks after_configuration and manipulate_resource_list from being called.
When Middleman starts, it reads config.rb and runs all extensions two times. The first time through, it runs in config mode (
app.mode? :config
). The second time through it runs in either build or server mode (app.mode? :build
orapp.mode? :server
, respectively). The config mode is intended to be used for registering cli flags. Since this extension doesn't currently contribute any cli flags, no processing is necessary in this mode. (In the future, if this extension does contribute cli flags, that logic would still be separate from normal processing).In the constructor is called, return immediately in config mode. This will prevent the callbacks
after_configuration
andmanipulate_resource_list
from being called.