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