Rename `docs/` to `web_demo/`
This commit is contained in:
parent
8723c5a4d3
commit
94edb9d5e0
|
|
@ -7,4 +7,4 @@ nknown = "nknown" # part of @55nknown username
|
||||||
Prefence = "Prefence" # typo in glutin_winit API
|
Prefence = "Prefence" # typo in glutin_winit API
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
extend-exclude = ["docs/egui_demo_app.js"] # auto-generated
|
extend-exclude = ["web_demo/egui_demo_app.js"] # auto-generated
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
This folder contains the files required for the egui web demo hosted at <https://www.egui.rs/>.
|
|
||||||
|
|
||||||
The reason the folder is called "docs" is because that is the name that GitHub requires in order to host a web page from the `master` branch of a repository.
|
|
||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
|
@ -68,7 +68,7 @@ else
|
||||||
FEATURES="${FEATURES},glow"
|
FEATURES="${FEATURES},glow"
|
||||||
fi
|
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:
|
# Clear output from old stuff:
|
||||||
rm -f "${FINAL_WASM_PATH}"
|
rm -f "${FINAL_WASM_PATH}"
|
||||||
|
|
@ -91,7 +91,7 @@ TARGET="target"
|
||||||
echo "Generating JS bindings for wasm…"
|
echo "Generating JS bindings for wasm…"
|
||||||
TARGET_NAME="${CRATE_NAME}.wasm"
|
TARGET_NAME="${CRATE_NAME}.wasm"
|
||||||
WASM_PATH="${TARGET}/wasm32-unknown-unknown/$BUILD/$TARGET_NAME"
|
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:
|
# 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
|
# wasm2wat target/wasm32-unknown-unknown/release/egui_demo_app.wasm | rg env
|
||||||
|
|
|
||||||
|
|
@ -14,5 +14,5 @@ cargo install basic-http-server
|
||||||
echo "starting server…"
|
echo "starting server…"
|
||||||
echo "serving at http://localhost:${PORT}"
|
echo "serving at http://localhost:${PORT}"
|
||||||
|
|
||||||
(cd docs && basic-http-server --addr 0.0.0.0:${PORT} .)
|
(cd web_demo && basic-http-server --addr 0.0.0.0:${PORT} .)
|
||||||
# (cd docs && python3 -m http.server ${PORT} --bind 0.0.0.0)
|
# (cd web_demo && python3 -m http.server ${PORT} --bind 0.0.0.0)
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,4 @@ set -eu
|
||||||
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
||||||
cd "$script_path"
|
cd "$script_path"
|
||||||
|
|
||||||
./build_demo_web.sh && ls -lh ../docs/*.wasm
|
./build_demo_web.sh && ls -lh ../web_demo/*.wasm
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
egui_demo_app_bg.wasm
|
||||||
|
egui_demo_app.js
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
This folder contains the files required for the egui web demo hosted at <https://www.egui.rs/>.
|
||||||
|
|
||||||
|
## Testing locally
|
||||||
|
* Build with `scripts/build_demo_web.sh`
|
||||||
|
* Host with `scripts/start_server.sh`
|
||||||
|
* Open <http://localhost:8888/index.html>
|
||||||
|
|
||||||
|
## Deploying egui.rs
|
||||||
|
Each merge into `master` will trigger a new deploy
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Loading…
Reference in New Issue