Refactor the dispatcher
Closed this issue · 0 comments
bartfeenstra commented
Replace all dispatching interfaces with plugins or a yet to be developed event API.
Once core components are defined as such, they should perhaps get an interface method that lets them register event handlers. We can invoke these methods after resolving the order of extensions.
Consider renaming events:
- loader -> ancestry load
- post loader -> ancestry process
- generate -> site generate
Document all events
Events can be types. Extensions can register handlers using these types, making everything type-safe
CssProvider and JsProvider can be called once when the Jinja2 environment starts?