49 lines
1.1 KiB
Bash
Executable File
49 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
ROOT=$(git rev-parse --show-toplevel)
|
|
|
|
RSASS_PATH=$(command -v rsass)
|
|
if [[ "${RSASS_PATH}" == "" ]]; then
|
|
cargo install rsass-cli
|
|
RSASS_PATH=$(command -v rsass)
|
|
fi
|
|
|
|
WASM_PACK_PATH=$(command -v wasm-pack)
|
|
if [[ "${WASM_PACK_PATH}" == "" ]]; then
|
|
cargo install wasm-pack
|
|
WASM_PACK_PATH=$(command -v wasm-pack)
|
|
fi
|
|
|
|
TRUNK_PATH=$(command -v trunk)
|
|
if [[ "${TRUNK_PATH}" == "" ]]; then
|
|
cargo install --locked trunk
|
|
TRUNK_PATH=$(command -v trunk)
|
|
fi
|
|
|
|
CARGO_WATCH=$(command -v cargo-watch)
|
|
if [[ "${CARGO_WATCH}" == "" ]]; then
|
|
cargo install cargo-watch
|
|
fi
|
|
|
|
export PROJECT_ROOT=$(git rev-parse --show-toplevel)
|
|
export CLIENT_ROOT=${PROJECT_ROOT}/crates/web
|
|
export HI_ROOT=${PROJECT_ROOT}/crates/highlight/bitque-highlight
|
|
export MODE=force
|
|
export BUILD_TYPE=--dev
|
|
export COPY_TO=${CLIENT_ROOT}/tmp
|
|
|
|
echo $PROJECT_ROOT
|
|
echo $CLIENT_ROOT
|
|
|
|
cd ${CLIENT_ROOT}
|
|
|
|
. ${ROOT}/.env
|
|
|
|
cargo watch \
|
|
-i ${CLIENT_ROOT}/src/location.rs \
|
|
-s ${CLIENT_ROOT}/scripts/run-wasm-pack.sh \
|
|
-w ${CLIENT_ROOT}/src \
|
|
-w ${CLIENT_ROOT}/Cargo.toml \
|
|
-w ${CLIENT_ROOT}/static \
|
|
-w ${CLIENT_ROOT}/js
|