skanaar / nomnoml

The sassy UML diagram renderer
https://www.nomnoml.com
MIT License
2.7k stars 209 forks source link

Which version of dagre is embedded? #81

Closed Jamesgt closed 5 years ago

Jamesgt commented 6 years ago

Unfortunately the example in readme to just drop in lodash, dagre and nomnoml is useless unless we use your embedded versions or you tell us which exact version were embedded. I've tried the latest versions and digging back the time of the commit and the versions around that time, but still no success.

haselkern commented 6 years ago

I want to use nomnoml on a website and have found out that the latest supported version for lodash is 3.10.1.

For dagre however, I still get this error:

dagre.Digraph is not a constructor

I could not find a compatible version for dagre.

happyDemon commented 6 years ago

Dagre 0.4.6 seems to work fine

skanaar commented 6 years ago

There were some issues with the Dagre versions that lead to the embedding of Dagre. Probably the same issues as you are facing now.

bombadillo commented 6 years ago

I struggled with this as well. I've put together a working sample app here: https://github.com/bombadillo/nomnoml-example

strobox commented 5 years ago

Cool project, but I also encountered some issue when tried it in browser. First is require('fs') code in built files. Second - is that issue. (Because installed last dagre@0.8.4) With 0.4.6 works fine.

skanaar commented 5 years ago

I have a branch were I try to upgrade dagre to a version that works properly with nomnoml. There are some layout issues that crop up if you don't update. And the latest versions of dagre have a lot of API changes so there is quite some work to be done.

strobox commented 5 years ago

@skanaar Understand about dagre. But I also think that very important for project is to use such builder library as rollup. It is better than using custom build script. Also, maybe make sense to use babel compiler for bundling. And then you can have 3 builds for main, browser and bin sections of package.json. Maybe have sense to initiate issue related to this improvements.

skanaar commented 5 years ago

How come you experience problems with require('fs') ? Please create a new issue if there is a bug.

I am aware that rollup is the flavor of the month and every hipster want to use it in their projects. Please create a new issue here if there are any real arguments for such a change.

Jamesgt commented 5 years ago

with @happyDemon 's answer I got what I wanted, so you can close this issue, I think.

skanaar commented 5 years ago

This issue should now be properly taken care of with release of nomnoml 0.4.0. Dagre has been upgraded to 0.8.4 and is now extracted from npm instead of relying on a bundled version.