From c17ffd09b43887276c8bfcde3c486c996c2501f7 Mon Sep 17 00:00:00 2001 From: John Murray <5672686+JRMurr@users.noreply.github.com> Date: Wed, 22 Nov 2023 11:06:16 -0500 Subject: [PATCH] update docs for wasm repl dev --- crates/lang_srv/debug_server.sh | 2 +- crates/repl_wasm/README.md | 5 +++-- www/.gitignore | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 www/.gitignore diff --git a/crates/lang_srv/debug_server.sh b/crates/lang_srv/debug_server.sh index 5510f3d8d7d..b7a9100b898 100755 --- a/crates/lang_srv/debug_server.sh +++ b/crates/lang_srv/debug_server.sh @@ -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 diff --git a/crates/repl_wasm/README.md b/crates/repl_wasm/README.md index be6731426cc..5f4cd8fb587 100644 --- a/crates/repl_wasm/README.md +++ b/crates/repl_wasm/README.md @@ -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 diff --git a/www/.gitignore b/www/.gitignore new file mode 100644 index 00000000000..9bc9fa870c6 --- /dev/null +++ b/www/.gitignore @@ -0,0 +1,2 @@ +# ignore a symlink to the wasm repl code +public/repl \ No newline at end of file