Skip to content

Commit 92a9f6c

Browse files
committed
Add directory changing for build
1 parent 76814aa commit 92a9f6c

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

scripts/build_wasm.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,22 @@ if [ -d "docs/_static" ]; then
6666
cp -r docs/_static/* panel/_static/
6767
fi
6868

69-
# Convert Panel apps to Pyodide worker
7069
echo "Converting Panel apps to Pyodide worker output..."
7170
export PYTHONPATH="${ROOT_DIR}/src:${PYTHONPATH:-}"
7271

73-
# Use clean, relative paths so Panel mirrors the directory structure correctly
72+
# Change directory into 'panel' so relative paths resolve correctly!
73+
cd "${ROOT_DIR}/panel"
74+
7475
"${PYTHON_BIN}" -m panel convert \
75-
panel/simdec_app.py \
76-
panel/sampling.py \
76+
simdec_app.py \
77+
sampling.py \
7778
--to pyodide-worker \
78-
--out "${OUT_DIR}" \
79-
--requirements "${SIMDEC_WHEEL_PATH}" numpy pandas matplotlib seaborn scipy SALib \
80-
--resources panel/data/stress.csv
79+
--out "${ROOT_DIR}/${OUT_DIR}" \
80+
--requirements "${ROOT_DIR}/${SIMDEC_WHEEL_PATH}" numpy pandas matplotlib seaborn scipy SALib \
81+
--resources data/stress.csv
82+
83+
# Step back out to the root directory for the rest of the script
84+
cd "${ROOT_DIR}"
8185

8286
# Copy custom index page and static assets
8387
echo "Copying custom index page and static assets..."

0 commit comments

Comments
 (0)