markushedvall / node-plantuml

A Node.js module and CLI for running PlantUML
MIT License
193 stars 53 forks source link

Should use viz.js when graphviz is not installed #26

Closed atifsyedali closed 5 years ago

atifsyedali commented 5 years ago

Resolves #25

markushedvall commented 5 years ago

Prepublish is used to ensure installers are not required to have access to sourceforge, see https://github.com/markushedvall/node-plantuml/issues/20

Either we need to publish with the jar for each platform, which doesn't sound great, or keep the get-plantuml-jar.js unchanged and add a seperate get-vizjs.js that can run during postinstall.

I think adding a separate script for retrieving the vizjs jar files is the way to go.

atifsyedali commented 5 years ago

Prepublish is used to ensure installers are not required to have access to sourceforge, see #20

Either we need to publish with the jar for each platform, which doesn't sound great, or keep the get-plantuml-jar.js unchanged and add a seperate get-vizjs.js that can run during postinstall.

I think adding a separate script for retrieving the vizjs jar files is the way to go.

Interesting, didn't know about #20. I like the separate get-vizjs.js during postinstall. Then it is up to the dependants to ensure that the build system has graphviz installed. However I will make sure that the postinstall script doesn't exit with an error code -- just an error is output in console.

atifsyedali commented 5 years ago

Reverted the change for getting plantuml.jar from postinstall back to prepublish. Also, downloading vizjs jars is now a separate postinstall script that does not exit with an error if the download is blocked (error is still printed in console).

markushedvall commented 5 years ago

So far I've only tested it on Linux but I've had some mixed result.

The installation work as expected so the problems I'm experiencing is with plantuml using vizjs. Basically every time I try to generate a diagram an exception is thrown in the java process (V8ScriptExecutionException). But most of the time I still get a diagram that looks fine. Sometimes I get a diagram that contain the whole stack trace instead.

I'm still fine with adding this as an experimental feature.

A few notes: