Skip to content

Commit

Permalink
update docs for wasm repl dev
Browse files Browse the repository at this point in the history
  • Loading branch information
JRMurr committed Nov 22, 2023
1 parent 5aaebde commit c17ffd0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/lang_srv/debug_server.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
${SCRIPT_DIR}/../../target/debug/roc_ls "$@" 2> /tmp/roc_ls.err
5 changes: 3 additions & 2 deletions crates/repl_wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ crates/repl_wasm/build-www.sh
### 2. Make symlinks to the generated Wasm and JS

```bash
cd www/public
mkdir -p www/public/repl
cd www/public/repl
ln -s ../../../crates/repl_wasm/build/roc_repl_wasm_bg.wasm
ln -s ../../../crates/repl_wasm/build/roc_repl_wasm.js
```
These symlinks are ignored by Git.

> This is a bit different from the production build, where we copy all the files to `www/build/`. But for development, it's convenient to have just one copy of files like `www/public/repl.js`. You can make changes, reload your browser to see them, and commit them to Git, without getting mixed up between different copies of the same file.
> This is a bit different from the production build, where we copy all the files to `www/build/`. But for development, it's convenient to have just one copy of files like `www/public/repl/repl.js`. You can make changes, reload your browser to see them, and commit them to Git, without getting mixed up between different copies of the same file.
### 3. Run a local HTTP server

Expand Down
2 changes: 2 additions & 0 deletions www/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ignore a symlink to the wasm repl code
public/repl

0 comments on commit c17ffd0

Please sign in to comment.