1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 14:49:06 -04:00

Rename docs/ to web_demo/

This commit is contained in:
Emil Ernerfeldt
2023-11-16 16:44:30 +01:00
parent 8723c5a4d3
commit 94edb9d5e0
14 changed files with 17 additions and 1777 deletions

View File

@@ -68,7 +68,7 @@ else
FEATURES="${FEATURES},glow"
fi
FINAL_WASM_PATH=docs/${OUT_FILE_NAME}_bg.wasm
FINAL_WASM_PATH=web_demo/${OUT_FILE_NAME}_bg.wasm
# Clear output from old stuff:
rm -f "${FINAL_WASM_PATH}"
@@ -91,7 +91,7 @@ TARGET="target"
echo "Generating JS bindings for wasm…"
TARGET_NAME="${CRATE_NAME}.wasm"
WASM_PATH="${TARGET}/wasm32-unknown-unknown/$BUILD/$TARGET_NAME"
wasm-bindgen "${WASM_PATH}" --out-dir docs --out-name ${OUT_FILE_NAME} --no-modules --no-typescript
wasm-bindgen "${WASM_PATH}" --out-dir web_demo --out-name ${OUT_FILE_NAME} --no-modules --no-typescript
# if this fails with "error: cannot import from modules (`env`) with `--no-modules`", you can use:
# wasm2wat target/wasm32-unknown-unknown/release/egui_demo_app.wasm | rg env

View File

@@ -14,5 +14,5 @@ cargo install basic-http-server
echo "starting server…"
echo "serving at http://localhost:${PORT}"
(cd docs && basic-http-server --addr 0.0.0.0:${PORT} .)
# (cd docs && python3 -m http.server ${PORT} --bind 0.0.0.0)
(cd web_demo && basic-http-server --addr 0.0.0.0:${PORT} .)
# (cd web_demo && python3 -m http.server ${PORT} --bind 0.0.0.0)

View File

@@ -3,4 +3,4 @@ set -eu
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$script_path"
./build_demo_web.sh && ls -lh ../docs/*.wasm
./build_demo_web.sh && ls -lh ../web_demo/*.wasm