Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

plantuml

agirorn1.8kMIT0.0.2

Convert PlantUML diagram text to SVG

PlantUML, UML, Unified Modeling Language, Modeling, Sequence diagram, Usecase diagram, Class diagram, Activity diagram, Component diagram, State diagram, Object diagram, Deployment diagram, Timing diagram

readme

npm version Build Status

plantuml

Convert PlantUML diagram text to SVG.

Using PlantUML Version 1.2022.7

Installation

$ npm install plantuml

Dependencies

Requires java and graphviz to be installed on the system.

Usage

const plantuml = require('plantuml');
const svg = await 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);

License

MIT