Skip to content

Commit

Permalink
docs: clarify how to call command line scripts (#7181)
Browse files Browse the repository at this point in the history
* docs: clarify how to call command line scripts

* style: auto-formatting [CI]

Co-authored-by: GitHub Actions Bot <vega-actions-bot@users.noreply.github.com>
  • Loading branch information
domoritz and GitHub Actions Bot committed Jan 31, 2021
1 parent b0552bc commit 0ed0cc8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions site/usage/compile.md
Expand Up @@ -93,6 +93,10 @@ The easiest way to run these commands is to use [`npx`](https://github.com/npm/n

`npx vl2vg spec.vl.json`

If you want to use the scripts in your project, you can prefix the calls with `node_modules/.bin/`. Alternatively, you can install vega and vega-lite globally (although we do not recommend it).

If you get an error `Error: CanvasRenderer is missing a valid canvas or context`, please install the [`canvas`](https://github.com/Automattic/node-canvas) package (or install vega-cli).

### Using npx

To use [npx](https://github.com/npm/npx), a tool to execute npm binaries, provide the required packages and choose the binary you want to run. For example, to run `vl2png`, run `npx -p vega -p vega-lite vl2png --help`.

0 comments on commit 0ed0cc8

Please sign in to comment.