From 61a15fbc48f20f05b2b41598f6b496286cb1be2d Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Fri, 22 Jan 2021 13:36:54 +0100 Subject: [PATCH 1/2] docs: clarify how to call command line scripts --- site/usage/compile.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/site/usage/compile.md b/site/usage/compile.md index 0561c55fe6..7f3b0cd299 100644 --- a/site/usage/compile.md +++ b/site/usage/compile.md @@ -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`. From abadf352dc1945d130d5763ee50289ba5586975d Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot Date: Fri, 22 Jan 2021 12:39:35 +0000 Subject: [PATCH 2/2] style: auto-formatting [CI] --- site/usage/compile.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/usage/compile.md b/site/usage/compile.md index 7f3b0cd299..9038c48e25 100644 --- a/site/usage/compile.md +++ b/site/usage/compile.md @@ -95,7 +95,7 @@ The easiest way to run these commands is to use [`npx`](https://github.com/npm/n 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). +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