2022-11-16 05:13:38PM

This commit is contained in:
Alexander Wang 2022-11-16 17:13:38 -08:00
parent d90625dc0a
commit 474d5f1655
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE
2 changed files with 4 additions and 1 deletions

View file

@ -39,7 +39,9 @@ Watch for changes to input and live reload. Use
.Ev $D2_PORT and $D2_HOST are also accepted and take priority. Default is localhost:0
.It Fl t , -theme Ar 0
Set the diagram theme to the passed integer. For a list of available options, see
.Lk https://oss.terrastruct.com/d2
.It Fl l , -layout Ar dagre
Set the diagram layout engine to the passed string. For a list of available options, run
.Ar layout
.It Fl b , -bundle Ar true
Bundle all assets and layers into the output svg.
.It Fl d , -debug

View file

@ -31,6 +31,7 @@ func run(ctx context.Context, ms *xmain.State) (err error) {
// :(
ctx = xmain.DiscardSlog(ctx)
// These should be kept up-to-date with the d2 man page
watchFlag, err := ms.Opts.Bool("D2_WATCH", "watch", "w", false, "watch for changes to input and live reload. Use $HOST and $PORT to specify the listening address.\n$D2_HOST and $D2_PORT are also accepted and take priority (default localhost:0, which is will open on a randomly available local port).")
if err != nil {
return xmain.UsageErrorf(err.Error())