Enteee / plantuml-parser

Parse PlantUML with JavaScript or TypeScript
https://duckpond.ch/category/plantuml-parser
Apache License 2.0
136 stars 33 forks source link

Do you have a plan to make this libary work inside a browser ? #70

Closed RNm-dove closed 1 year ago

RNm-dove commented 3 years ago

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.

RNm-dove commented 3 years ago

Sorry, I have submitted on the half. I'll put more information.

Enteee commented 3 years ago

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?

hikerpig commented 3 years ago

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.

ghost commented 2 years ago

In the browser, __dirname is not defined, maybe consider extracting the parseFile separately

Enteee commented 1 year ago

I am really not sure how to proceed with this. Since the original author is no longer responding I am going to close this.