From 4854b541ed428b05bb468ae6371126f2d06ef4b3 Mon Sep 17 00:00:00 2001 From: Sarah Wang Date: Wed, 26 Jun 2024 21:48:24 -0400 Subject: [PATCH] update cli doc page --- docs/docs/06-cli.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/docs/docs/06-cli.md b/docs/docs/06-cli.md index 1d7f5e37..05da6a0b 100644 --- a/docs/docs/06-cli.md +++ b/docs/docs/06-cli.md @@ -16,8 +16,28 @@ $ npx memory-viz replacing `` with the path to a file containing MemoryViz-compatible JSON. If the file content is not compatible with MemoryViz, an error will be thrown. -Optional arguments `--height` and `--width` can be used to specify the height and width of the generated SVG. - ## Output The output is an SVG image generated by MemoryViz and the image is saved in the current working directory. The name of the SVG will be the same as that of the inputted file (i.e., if the inputted file is `david-is-cool.json`, the output will be `david-is-cool.svg`). + +## Options + +Below are optional arguments used to specify the way in which the SVG image is generated. + +#### `--height` and `--width` + +Specifies the height and width of the generated SVG. + +```console +$ npx memory-viz --width=700 +``` + +#### `--roughjs_config` + +Specifies the style of the generated SVG. Please refer to the [Rough.js documentation](https://github.com/rough-stuff/rough/wiki#options) for available options. + +The argument is a comma-separated list of key-value pairs in the form ``. + +```console +$ npx memory-viz --roughjs-config fill=red,fillStyle=solid +```