Last active
December 25, 2023 07:29
-
-
Save derektamsen/c0cd95efc2132b93b4af348c8cbd04e3 to your computer and use it in GitHub Desktop.
Makefile to render all mermaid diagrams in the directory it is placed in.
This file contains hidden or 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
| src_files := $(wildcard *.mmd) | |
| out_files := $(patsubst %.mmd,output/%.png,$(src_files)) | |
| .PHONY: all clean | |
| all: $(out_files) | |
| output/%.png: %.mmd | |
| mkdir -p $(dir $@) | |
| mmdc -c ./mermaidconfig.json \ | |
| -i $< \ | |
| -o $@ | |
| clean: | |
| rm output/*.png |
This file contains hidden or 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
| { | |
| "theme": "default" | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Enough7 You are welcome! Thanks of the modification. I have also updated the gist with your suggestions.