-
Notifications
You must be signed in to change notification settings - Fork 53
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
SVG output is broken #35
Comments
@krisztianb any idea if this is going to be fixed? |
Hello @Ognian actually I don't really care anymore, because I'm soon going to release a module on npm that does the same thing this module does and can even generate multiple diagrams with one process. You can have a look here: https://github.com/krisztianb/plantuml-pipe |
@Ognian I've just released plantuml-pipe on NPM: https://www.npmjs.com/package/plantuml-pipe I hope it can help you. |
Hey, |
@sylvainar-adeo thanks. I'm not planing to adapt node-plantuml and I'm not the package owner. Actually I only created plantuml-pipe, because node-plantuml seems to be abandoned. I want to keep plantuml-pipe as simple a possible, but I'm open to feature requests. Feel free to use whichever package suits you most. |
Okay nice! Right now i'm using node-plantuml like this: /**
* Generate a single output file from PUML.
*
* @async
* @param {string} source - Source path.
* @param {string} dest - Dest path.
*/
const promiseGenerator = (source, dest) => new Promise((resolve, reject) => {
const generator = plantuml.generate(source, PUML_OPTIONS);
const fileStream = fs.createWriteStream(dest);
fileStream.on('error', reject);
generator.out.on('error', reject);
generator.out.pipe(fileStream);
fileStream.on('finish', () => {
resolve();
});
}); If you have an equivalent on plantuml-pipe I'd be happy to switch 😄 Edit: (oups, cross-posting with another account) |
I really like this promise approach. I was thinking about how plantuml-pipe could be used in this manner, but couldn't come up with a sensible solution so far. The problem is that you would need to generate a Promise that gets resolved inside of the streams data event. It can be done, but the code looks quite ugly imho. So the short answer is: I'm afraid you can't just simply replace node-plantuml with plantuml-pipe without some refactoring of your code. 😞 |
Hi there!
I'm using your module in my typedoc plugin: https://github.com/krisztianb/typedoc-umlclass/blob/master/src/image_generator.ts#L34
In version 0.5.0 of your module the SVG output is working fine. In later versions (0.7.0 and later) it produces a malformed output. Unfortunately I could not test 0.6.x as their installer fails/hangs while downloading the JAR file.
You can find more on this issue here: krisztianb/typedoc-umlclass#2
Kind regards and thanks for your great work!
The text was updated successfully, but these errors were encountered: