Closed RNm-dove closed 1 year ago
Sorry, I have submitted on the half. I'll put more information.
Hello and thank you for your interest in this project. I am not quite sure what you are trying to do. Especially what do you mean by "an api for browser". Do you try to webpack the project and run it inside the browser? This is an interesting idea, I've also had in mind doing quite some time ago. But sadly I never really got around actually testing this.
If you could share a bit more insight about what you are trying to do and maybe an example configuration or setup that would help!
About your current problem with fast-glob: fast-glob is used for command line argument processing. It's only used in the parseFile
entry point. So definitely something you don't need in the browser. Maybe just removing that dependency will get you somewhere?
I am also interested in this. For I want to build Mermaid.js alike library for both browser and Node.js. And I am considering parsing with peg.js or nearley.js. Your project is a good try.
In the browser, __dirname
is not defined, maybe consider extracting the parseFile
separately
I am really not sure how to proceed with this. Since the original author is no longer responding I am going to close this.
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
I want to use this library in my React app, but an error cased by fast-glob says glob path is valid only in NodeJS. I would be happy if I can have api for browser.
Describe alternatives you've considered
I can't come up with other idea.