Convert PlantUML diagram text to SVG with plantuml.jar.
Using PlantUML MIT Version 1.2023.2 plantuml.jar
$ npm install sync-plantuml
Requires java to be installed on the system.
import { plantuml } from 'sync-plantuml';
const svg = plantuml(`
@startuml
Bob -> Alice : hello
Alice -> Wonderland: hello
Wonderland -> next: hello
next -> Last: hello
Last -> next: hello
next -> Wonderland : hello
Wonderland -> Alice : hello
Alice -> Bob: hello
@enduml
`);
require('fs').writeFileSync('image.svg', svg);
MIT