Make it easier to adapt some settings for the web
This commit is contained in:
parent
eed822cf46
commit
843f250c9b
|
@ -1,5 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
CRATE_NAME=${PWD##*/} # assume crate name is the same as the folder name
|
||||
|
||||
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
||||
cd "$script_path"
|
||||
|
||||
|
@ -30,8 +33,6 @@ done
|
|||
|
||||
# ./setup_web.sh # <- call this first!
|
||||
|
||||
FOLDER_NAME=${PWD##*/}
|
||||
CRATE_NAME=$FOLDER_NAME # assume crate name is the same as the folder name
|
||||
CRATE_NAME_SNAKE_CASE="${CRATE_NAME//-/_}" # for those who name crates with-kebab-case
|
||||
|
||||
# This is required to enable the web_sys clipboard API which egui_web uses
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
PORT=8080
|
||||
|
||||
# Starts a local web-server that serves the contents of the `doc/` folder,
|
||||
# which is the folder to where the web version is compiled.
|
||||
|
||||
echo "open http://localhost:8080"
|
||||
echo "open http://localhost:$PORT"
|
||||
|
||||
(cd docs && basic-http-server --addr 127.0.0.1:8080 .)
|
||||
# (cd docs && python3 -m http.server 8080 --bind 127.0.0.1)
|
||||
(cd docs && basic-http-server --addr 127.0.0.1:$PORT .)
|
||||
# (cd docs && python3 -m http.server $PORT --bind 127.0.0.1)
|
||||
|
|
Loading…
Reference in a new issue