2020-05-19 11:55:55 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-01-18 22:59:12 +01:00
|
|
|
RSASS_PATH=$(command -v rsass)
|
2021-04-15 22:32:05 +02:00
|
|
|
if [[ "${RSASS_PATH}" == "" ]]; then
|
2021-01-15 22:57:26 +01:00
|
|
|
cargo install rsass --features=commandline
|
|
|
|
fi
|
|
|
|
|
2021-01-18 22:59:12 +01:00
|
|
|
WASM_PACK_PATH=$(command -v wasm-pack)
|
2021-04-15 22:32:05 +02:00
|
|
|
if [[ "${WASM_PACK_PATH}" == "" ]]; then
|
2021-01-18 22:59:12 +01:00
|
|
|
cargo install wasm-pack
|
|
|
|
fi
|
|
|
|
|
2020-11-25 20:14:52 +01:00
|
|
|
export PROJECT_ROOT=$(git rev-parse --show-toplevel)
|
|
|
|
export CLIENT_ROOT=${PROJECT_ROOT}/jirs-client
|
|
|
|
export HI_ROOT=${PROJECT_ROOT}/highlight/jirs-highlight
|
|
|
|
export MODE=force
|
|
|
|
export BUILD_TYPE=--dev
|
2020-08-10 16:45:30 +02:00
|
|
|
|
2020-10-18 10:35:41 +02:00
|
|
|
cd ${CLIENT_ROOT}
|
2020-05-19 11:55:55 +02:00
|
|
|
|
2020-10-18 10:35:41 +02:00
|
|
|
. .env
|
2020-11-25 20:14:52 +01:00
|
|
|
|
|
|
|
cargo watch \
|
2021-04-15 22:32:05 +02:00
|
|
|
-i ./jirs-client/src/location.rs \
|
2020-11-25 20:14:52 +01:00
|
|
|
-s ${CLIENT_ROOT}/scripts/run-wasm-pack.sh \
|
|
|
|
-w ${CLIENT_ROOT}/src \
|
|
|
|
-w ${CLIENT_ROOT}/Cargo.toml \
|
|
|
|
-w ./static \
|
|
|
|
-w js
|