-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#674] Make mermaid-generated images available to webapp
- Loading branch information
1 parent
dd4d015
commit 317c654
Showing
9 changed files
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Installing mermaid-cli" | ||
npm update -g @mermaid-js/mermaid-cli || echo "Failed to install mermaid-cli. Aborting" | ||
|
||
repo_root_dir="$(git rev-parse --show-toplevel)" | ||
webapp_images_dir="${repo_root_dir}/webapp/src/assets/images" | ||
|
||
echo "Generating files into ${webapp_images_dir}" | ||
for mmd_file in ./*.mmd; do | ||
png_file="${mmd_file%.mmd}.png" | ||
echo "- Generating ${png_file} from ${mmd_file}" | ||
mmdc --input "${mmd_file}" --output "${webapp_images_dir}/${png_file}" --theme dark --backgroundColor transparent | ||
done |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes
File renamed without changes
File renamed without changes