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

Pre/post process callbacks/hooks #29

Open
nolimits4web opened this issue Apr 10, 2018 · 0 comments
Open

Pre/post process callbacks/hooks #29

nolimits4web opened this issue Apr 10, 2018 · 0 comments

Comments

@nolimits4web
Copy link
Member

nolimits4web commented Apr 10, 2018

This is also can be useful, if compiler will accept pre and post process hooks, it will allow to do extra modifications with input/output:

  • preContent - hook that will receive input file string. It can return modified string that will be proceeded by compiler to ast and so on
  • preAst - hook that will receive ast when it was just parsed to ast by component, but didn't go through any modifications/transformers yet
  • postAst - hook that will receive ast after it passed all transformers and just before its compilation back to string in compiler
  • postContent - hook that will receive compiled from ast script string, right before it will be saved to file. It can return modified string that will be saved to file

I think we may such hooks/callbacks on both root config level and separately for each compiler (vue, react)

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