Skip to content

Commit

Permalink
fix and extend usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
schaetzc committed Sep 15, 2024
1 parent 4a954c8 commit b9aa226
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b9aa226

Please sign in to comment.