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

Using Erd as a library #10

Open
ftomassetti opened this Issue Apr 17, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@ftomassetti

ftomassetti commented Apr 17, 2015

First of all compliments for reaching 100 stars :D
I would like to use Erd as a library in a Web Server (to generate diagrams), are you considering making erd available on hackage also as a library?

@BurntSushi

This comment has been minimized.

Show comment
Hide comment
@BurntSushi

BurntSushi Apr 18, 2015

Owner

Oh! Yay. Didn't even notice. :-)

I haven't really thought of making this available as a library. I probably won't spend the time to do it myself, but I'd be OK with a PR that I'd be willing to maintain unless as it stays simple.

An alternative is to shell out to the erd binary, but of course, I understand that is not ideal.

Owner

BurntSushi commented Apr 18, 2015

Oh! Yay. Didn't even notice. :-)

I haven't really thought of making this available as a library. I probably won't spend the time to do it myself, but I'd be OK with a PR that I'd be willing to maintain unless as it stays simple.

An alternative is to shell out to the erd binary, but of course, I understand that is not ideal.

@ftomassetti

This comment has been minimized.

Show comment
Hide comment
@ftomassetti

ftomassetti Apr 18, 2015

Ok, I will look into preparing that PR. I would basically just move everything but the main function to a library project named erd-lib, leaving in erd just the main and adding a dependency on erd-lib.

In my proof of concept I had just to change a method to get my desired behavior: I made loadER accept a Text instance of a file handle, to make it possible to parse code in memory.

ftomassetti commented Apr 18, 2015

Ok, I will look into preparing that PR. I would basically just move everything but the main function to a library project named erd-lib, leaving in erd just the main and adding a dependency on erd-lib.

In my proof of concept I had just to change a method to get my desired behavior: I made loadER accept a Text instance of a file handle, to make it possible to parse code in memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment