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

Include AST in result of svelte.compile #632

Closed
Rich-Harris opened this issue Jun 12, 2017 · 0 comments
Closed

Include AST in result of svelte.compile #632

Rich-Harris opened this issue Jun 12, 2017 · 0 comments

Comments

@Rich-Harris
Copy link
Member

For cases like sveltejs/v2.svelte.dev#103, it would be useful to have access to the component AST. Should probably sanitize it first (so that internal change-prone things like _scope don't accidentally become depended on) which would be relatively straightforward — if it turns out that has a non-trivial impact on speed (which I doubt) then it could be put behind an option.

const { code, map, ast } = svelte.compile(source);
Rich-Harris added a commit that referenced this issue Jun 15, 2017
include ast in svelte.compile return value
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

No branches or pull requests

1 participant