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

[Feature request] add a tab with the generated Babel code #678

Open
budarin opened this issue Nov 21, 2022 · 2 comments
Open

[Feature request] add a tab with the generated Babel code #678

budarin opened this issue Nov 21, 2022 · 2 comments

Comments

@budarin
Copy link

budarin commented Nov 21, 2022

Often we either need to see how the Babel code is generated for some code, or there is a need to quickly get the generated Babel code for a specific code, but it takes a very long and tedious time to write it with your hands

It would be just great if there was a tab next to the Tree and JSON - "Code", which would display the generated Babel code for the example on the left side

Every plugin developer would be very grateful to you for this - it would be a huge help in writing plugins even for beginners

@fkling
Copy link
Owner

fkling commented Nov 25, 2022

What exactly do you mean with "babel code"? How one one use @babel/types to generate the same AST/code structure? Or something else?

I'm currently working on an update to astexplorer and this would allow parsers to return multiple "artifacts", not just an AST. That would allow e.g. the babel parser to return an additional file.

@budarin
Copy link
Author

budarin commented Nov 25, 2022

Yes, I would like to see code based on @babel/types that constructs this code in js

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

2 participants