fix: auto-install frontend deps in build script
Add npm install check to build_gui() — if node_modules/ is missing or doesn't match package-lock.json, install dependencies before building.
This commit is contained in:
parent
0fdf77ce03
commit
767bf5c140
|
|
@ -13,8 +13,14 @@ BUILD_DIR="build"
|
|||
build_gui() {
|
||||
echo "==> Building GUI binary..."
|
||||
|
||||
# Build frontend
|
||||
cd frontend && npm run build && cd ..
|
||||
# Ensure frontend dependencies are installed
|
||||
cd frontend
|
||||
if [ ! -d "node_modules" ] || [ ! -f "node_modules/.package-lock.json" ]; then
|
||||
echo "==> Installing frontend dependencies..."
|
||||
npm install
|
||||
fi
|
||||
npm run build
|
||||
cd ..
|
||||
|
||||
# Copy frontend dist to Wails embed directory
|
||||
rm -rf cmd/verstak-gui/frontend-dist
|
||||
|
|
|
|||
Loading…
Reference in New Issue