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

How do I use this? #2

Open
mmkal opened this issue May 29, 2024 · 1 comment
Open

How do I use this? #2

mmkal opened this issue May 29, 2024 · 1 comment

Comments

@mmkal
Copy link

mmkal commented May 29, 2024

Possibly related to #1

This looks very interesting! But I don't see how it's supposed to be used. The example html references js/erdiagram.min.js and #1 mentions it's a generated file, but it's not there on npm: https://www.npmjs.com/package/entity-relationship-diagram?activeTab=code

Maybe the project needs to be bundled before (re-)publishing to npm?

(Also, I noticed npm is listed as a dependency - is that a mistake?)

I imagine the rest wouldn't be too hard to figure out but if there's a guide somewhere I'd be keen to read it (i.e. what happens when we reference the erdiagram.min.js script, what global variables are set, etc.)

@hunyadi
Copy link
Owner

hunyadi commented May 31, 2024

I must have made a mistake when publishing to npm, I am definitely not an expert in the Node world. Internally, we pull, compile and publish the project directly from the repository.

I don't think I have a guide yet, but you can take at a real-world setup as an example. The entities and relationships are defined in a separate file, which exports the variable EntityRelationshipGraph . This is the only global variable used.

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