Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pug Linker - Plugins #2686

Open
ForbesLindesay opened this issue Jan 25, 2017 · 0 comments
Open

Pug Linker - Plugins #2686

ForbesLindesay opened this issue Jan 25, 2017 · 0 comments

Comments

@ForbesLindesay
Copy link
Member

I'm not that confident what a plugin API for the linker should look like, but my current thinking is to have the following hooks:

  1. pre-link (gets given asts that are about to be linked)
  2. pre-extend (gets given the parent ast and the child ast before any blocks have been resolved)
  3. extend (gets given the parent ast and child ast before any blocks have been resolved, but then skips built in block resolving)
  4. post-extend (gets given the parent ast and the child ast after blocks have been resolved)
  5. pre-include (gets include node before yield has been applied)
  6. include (gets include node before yield has been applied, but skips applying yield)
  7. post-include (gets include after yield has been applied)
  8. post-link (gets given asts after all other linking is done)

We should handle raw/filtered includes somewhere else so they don't feature in this proposed plugin API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant