Skip to content

Commit

Permalink
update cli doc page
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahsonder committed Jun 27, 2024
1 parent 6267cc0 commit 4854b54
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions docs/docs/06-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,28 @@ $ npx memory-viz <path-to-file>

replacing `<path-to-file>` 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 <path-to-file> --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 `<key1=value1,key2=value2,...>`.

```console
$ npx memory-viz <path-to-file> --roughjs-config fill=red,fillStyle=solid
```

0 comments on commit 4854b54

Please sign in to comment.