tslint-folders-diagrams v3.1.8
generating diagrams of the architecture described in tslint.json
The configuration of tslint-folders-diagrams
is a description of the architecture of your TypeScript project (see tslint.tslint-folders.json for an example).
tslint-folders-diagrams
can generate dot files from its configuration. A dot file is a simple format to describe a graph of nodes.
If you install graphviz
, then you can generate image diagrams from those dot files.
So, you can automatically generate architecture diagrams from the same configuration that tslint-folders-diagrams
uses to validate the source code.
note: the example scripts output SVG files which are scalable and work with markdown and so work with gitlab, npmjs etc.
install graphviz
generating a graph image from tslint-folders-diagrams
./generate_graph_image <path to tslint.json>
example
./generate_graph_image_example
assumptions
- graphviz has been installed and 'dot' is available at the command line.
- the machine has an environment variable
TEMP
pointing to a temporary files location.
notes for Windows
Windows download
https://graphviz.gitlab.io/_pages/Download/Download_windows.html
Windows + Q -> Environment variables.
Add this to the PATH environment variable:
C:\Program Files (x86)\Graphviz2.38\bin
So then dot.exe
is reachable.
executing bash scripts on Windows
- use cmder (bash)
references
bash cheat sheet
graphviz
graphviz color schemes
https://graphviz.gitlab.io/_pages/doc/info/colors.html
The default used is pastel19
.
graphviz online
graphviz in Visual Code
extension 'Graphviz Preview'