Skip to content

Commit

Permalink
Update docs for pgn-viewer linking (#116)
Browse files Browse the repository at this point in the history
* Update docs for pgn-viewer linking

* have to pnpm link for each module
  • Loading branch information
fitztrev authored Sep 8, 2024
1 parent 5d7c829 commit 1144d26
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,39 +216,36 @@ docker compose run --rm -w /dartchess mobile bash -c "dart pub get && dart analy
docker compose run --rm -w /dartchess mobile bash -c "dart pub get && dart test -x full_perft"
```

### Developing Chessground locally
### Developing Chessground or PGN-Viewer locally

By default, your local lila instance will use the version of chessground that is published to npm. If you want to make changes to that library and see them reflected in your local lila instance, you can do the following:
By default, your local lila instance will use the version of chessground + pgn-viewer that are published to npm. If you want to make changes to either library and see them reflected in your local lila instance, you can do the following:

1. Have lila use the local version of chessground:
1. Have lila use the local copy:

```bash
docker compose run --rm -w /lila ui bash -c "pnpm link /chessground"
docker compose run --rm ui bash -c "for dir in ui/bits ui/opening ui/site ui/tutor ui/common; do cd /lila/\$dir && pnpm link /pgn-viewer; done"
```

2. Start the chessground compiler in watch mode:
2. Start the compilers in watch mode:

```bash
docker compose run --rm -w /chessground ui bash -c "pnpm install && pnpm run compile --watch"
docker compose run --rm -w /pgn-viewer ui bash -c "pnpm install && pnpm run dist"
```

See the updated chessground demo: http://localhost:8090/demo.html
See the updated pgn-viewer demo: http://localhost:8091/

3. Start the lila ui build in watch mode:

```bash
./lila-docker ui
```

Then you can see the updated chessground demo at http://localhost:8090/demo.html and when you refresh lila, it will use the local copy of chessground.

### Developing PGN Viewer locally

To re-compile the PGN Viewer after making changes:

```bash
docker compose run --rm -w /pgn-viewer ui bash -c "pnpm run sass-dev && pnpm run bundle-dev"
```

See the changes on the PGN Viewer demo page: http://localhost:8091/
and when you refresh lila, it will use the local copy of chessground and/or pgn-viewer.

### InfluxDB Monitoring

Expand Down

0 comments on commit 1144d26

Please sign in to comment.