forked from backstage/backstage
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: added plantuml generation script
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# This script uses plantuml to generate SVG images from inline plantuml descriptions. | ||
# See ./auth/oauth.md for an example. | ||
# | ||
# You need to have plantuml installed (brew install plantuml, or some other method). | ||
# | ||
# Either call directly to generate diagrams for all markdown files in this directory, | ||
# or add a --watch flag to rebuild SVGs on changes. | ||
|
||
cd "$( dirname "${BASH_SOURCE[0]}" )" | ||
|
||
if [[ "$1" == '--watch' ]]; then | ||
npx --no-install nodemon --ext md --exec './generate-uml.sh' | ||
fi | ||
|
||
grep '@startuml' -rl --include '*.md' . | while read -r file ; do | ||
echo "Generating : $file" | ||
plantuml -tsvg "$file" 2> >(grep -v "CoreText note:") | ||
done |