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

Consider making it available for other go projects to use as library #23

Closed
thers opened this issue Feb 18, 2020 · 1 comment
Closed

Comments

@thers
Copy link

thers commented Feb 18, 2020

It would be great if we could reuse parts of it. In particular I'd like to reuse the parser part.

@evanw
Copy link
Owner

evanw commented Feb 20, 2020

The parser in esbuild is very specific to this project and contains many things that are only needed for later passes inside esbuild. The API of the parser is intended to be internal only. This lets me iterate on it and adapt it to whatever esbuild needs. Making the parser reusable would make it harder for me to improve esbuild.

I don't think there's anything particularly special about esbuild's parser. The big speed up that esbuild achieves is more due to the rest of the pipeline that does bundling, minifying, and source map generation much faster than other bundlers. I'm sure there are other parsers for JavaScript written Go that are just as fast while also having a stable API. If not, someone could fork the parser in this project and create a stable API out of it, but that's a separate project than this one.

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