Skip to content

Commit

Permalink
feat(puml): cleanup url, make notes about svg determinism
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisdaly committed Dec 8, 2020
1 parent 9f54522 commit 872a5ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ We use a git commit hook to automatically rebuild `.svg` files from plantuml
sources. The magic of git hooks means that no extra work is required by you
after creating or editing a `.puml` file

Behind the scenes, this hook spins up a docker container to run the PUML server
and calls `./scripts/_render_svg.js` for each file that has changed. We use the
docker version instead of the public puml server to (1) get around rate limits, and
(2) ensure deterministic SVG output that is git diffable.

### Creating a new PUML

1. Create a new `*.puml/plantuml` file
Expand Down
1 change: 0 additions & 1 deletion scripts/_render_svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const SVGO = require('svgo')
const plantumlEncoder = require('plantuml-encoder')

const rendererBaseUrl = process.env.PUML_BASE_URL || 'http://www.plantuml.com/plantuml'
console.log('rendererBaseUrl is', rendererBaseUrl)

svgo = new SVGO({
js2svg: { pretty: true, indent: 2 },
Expand Down

0 comments on commit 872a5ac

Please sign in to comment.