Skip to content

Commit

Permalink
Update README.md (#475)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Hunter <[email protected]>
  • Loading branch information
ianfhunter authored Mar 26, 2024
1 parent f6822dc commit c313b2e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ nav_order: 0

# Javascript

GNOLL is currently supported in Node as a console level application.
It is **not** supported in the browser yet.
We appreciate contributions that can change this.
GNOLL is currently supported in Node as a console level application and as a browser package.

Emscripten does not allow file writing [ref](https://stackoverflow.com/a/54384808),
at least via the same mechanism as the other languages,
Expand All @@ -22,14 +20,19 @@ Output is currently only via stdout.
sudo apt-get install emscripten nodejs
```

### Build
### Run (Console)

```bash
make javascript
```

### Run

```bash
node build/js/a.out.js
```

### Run (Browser)

Build with `make all jsweb`
Start a web server (e.g. `python3 -m http.server 8003 &> /dev/null &`)
Load index.html (http://localhost:8003/index.html in the previous example).
Provide notation in the textbox and press the "Roll" button. Output is printed to a separate div.

0 comments on commit c313b2e

Please sign in to comment.