diff --git a/README.md b/README.md index 863330e00..ae2e52b79 100644 --- a/README.md +++ b/README.md @@ -10,21 +10,29 @@ You can reset the Vega Editor by going to https://vega.github.io/editor/#/reset ## Usage Instructions -To run the editor locally, you must first install the dependencies and then launch a local web server. We assume you have [yarn](https://yarnpkg.com/), `bash`, `curl`, and `tar` installed. +### In Short +```bash +sudo docker run -it --rm -p 1234:1234 node:21 bash -xc 'mkdir -p vega/editor && git clone --depth=1 https://github.com/vega/editor.git vega/editor && cd vega/editor && yarn && yarn start' +``` -1. Install the dependencies: +### In Detail +We assume you have the following tools installed: +- [yarn](https://yarnpkg.com/) +- The older `node` version 21, because of an incompatibility in one of our dependencies, see [node-canvas issue](https://github.com/Automattic/node-canvas/issues/2377) +- `bash`, `curl`, and `tar` -``` -$ yarn -``` +Your working copy of this git repository must be located at least two levels below the system root `/`. +E.g. `/home/user/editor` or `/vega/editor`, but not `/editor`. -2. Start the server: +Inside your working copy ... -``` -$ yarn start -``` +1. Install the dependencies: + `$ yarn` + +2. Launch the local web server: + `$ yarn start` -3. The local web server will be accessible from [http://localhost:8080](http://localhost:8080). +3. The local web server will be accessible via [http://localhost:1234](http://localhost:1234). ## Local Testing & Debugging