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

feat(compiler-sfc): analyze script bindings #1962

Merged
merged 10 commits into from Aug 28, 2020

Conversation

CyberAP
Copy link
Contributor

@CyberAP CyberAP commented Aug 26, 2020

Should it support injections and computeds as well?
Which cases should be supported in addition to the basic ones?
I also think that having multiple parsing passes for <script> blocks is not optimal, maybe babel's ast should be contained within the SFCScriptBlock?

@CyberAP CyberAP changed the title feat(compiler-sfc): script bindings feat(compiler-sfc): analyze script bindings Aug 26, 2020
@yyx990803
Copy link
Member

  • BindingMetadata can only be one of 'data' | 'props' | 'setup' | 'options' - so anything that is not data, setup or props goes into options.

  • Re attach AST on the block: yeah I think that's a good idea.

@CyberAP
Copy link
Contributor Author

CyberAP commented Aug 26, 2020

I've managed to do parsing only once by passing AST directly to analyzeScriptBindings.
Is this ok? Should analyzeScriptBindings be exported in that case?

@CyberAP CyberAP marked this pull request as ready for review August 26, 2020 23:02
@yyx990803 yyx990803 merged commit 4421c00 into vuejs:master Aug 28, 2020
@yyx990803
Copy link
Member

👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants