A Yaml-scene extension which generate sequence diagrams from comment line in code
It's an extension for
yaml-scene
- Generate to sequence diagram base on comment lines in code
- Auto analystic sequence diagram to exports to a flow diagram which describe components in service, communications between them...
- Platform
yaml-scene
yas add yas-sequence-diagram # npm install -g yas-sequence-diagram OR yard global add yas-sequence-diagram
docker run --rm -it \
-v $PWD:/input \
-v $PWD:/output \
doanthuanthanh88/yaml-scene \
-f \
https://raw.githubusercontent.com/doanthuanthanh88/yas-sequence-diagram/main/practice/sequence_doc.yas.yaml
Mount folder includes sources code to
/input
. (Default is$PWD
)
Mount folder contains the result to/output
. The result will be saved to/output/seq_doc
. (Default is$PWD/seq_doc
)
- Create a file
seq_diagram_scene.yaml
- yas-sequence-diagram:
commentTag: /// # Prefix each of line which will be handled to document (optional)
# Default:
# .js, .ts, .go, .java is ///
# .py, .yaml is #/
# others must be set before run
includes: ["src"] # All of files in these path will be scanned (required)
excludes: [] # All of files in these path will be ignored (optional)
# Default:
# .js, .ts is ['node_modules', 'dist']
# .java is ['bin', 'build']
# .py is ['__pycache__']
includePattern: ".+\\.ts$" # Files matched this pattern will be handled (required)
outDir: (/tmp/sequence_diagram) # Output directory which includes sequence diagrams
- Run to generate sequence diagram
yas seq_diagram_scene.yaml
- After done, please go to
/tmp/sequence_diagram
to see result.