Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarify how to call command line scripts #7181

Merged
merged 2 commits into from
Jan 31, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions site/usage/compile.md
Original file line number Diff line number Diff line change
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`.