Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 607 Bytes

d2.md

File metadata and controls

28 lines (21 loc) · 607 Bytes

D2 Cheatsheet

Links to references:

Directory structure that might make it easier to build models that share components (icons, model views, themes)

/dev/d2
/dev/d2/icons
/dev/d2/hfr
/dev/d2/hfr/context
/dev/d2/hfr/container/
/dev/d2/hfr/component
/dev/d2/hfr/data-flow

Format all the d2 files in current directory and create svg and png versions of each.

for FILE in *.d2; do d2 fmt $FILE; d2 --theme 200 $FILE; d2 --theme 200 $FILE $FILE:r.png; done  

Watch a file under development and send the svg to a local web server.

d2 -w file.d2