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

Add a way to get Deno.emit to emit formatted code #53

Open
jaydenseric opened this issue Jul 17, 2021 · 0 comments
Open

Add a way to get Deno.emit to emit formatted code #53

jaydenseric opened this issue Jul 17, 2021 · 0 comments

Comments

@jaydenseric
Copy link

At the moment, Deno.emit outputs messy code, that is not in the same format that Deno fmt produces.

Either by default, or as a new option, it would be great if there was a way to get Deno.emit to emit formatted code that is accounted for in the source maps that are also emitted.

Until this enhancement is implemented a workaround is a bit tricky. Unfortunately there is not a runtime API yet for fmt, see: denoland/deno#10731 . So you would need to use the fmt CLI somehow in a child process? That's something I haven't done yet in Deno. Would there be a way to get the source map to include the changes made by the fmt CLI?

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

2 participants