make dev: If you haven't built it before, you need to run build first.
This commit is contained in:
parent
9bade4690c
commit
4db27adb48
1 changed files with 8 additions and 2 deletions
10
web/Makefile
10
web/Makefile
|
|
@ -1,7 +1,11 @@
|
|||
.PHONY: dev dev-frontend dev-backend build test lint clean
|
||||
.PHONY: dev dev-frontend dev-backend test lint clean
|
||||
|
||||
# Run both frontend and backend dev servers
|
||||
dev:
|
||||
@if [ ! -f backend/picoclaw-web ] || [ ! -d frontend/dist ]; then \
|
||||
echo "Build artifacts not found, building..."; \
|
||||
$(MAKE) build; \
|
||||
fi
|
||||
@echo "Starting backend and frontend dev servers..."
|
||||
@$(MAKE) dev-backend & $(MAKE) dev-frontend
|
||||
|
||||
|
|
@ -14,7 +18,9 @@ dev-backend:
|
|||
cd backend && go run .
|
||||
|
||||
# Build frontend and embed into Go binary
|
||||
build:
|
||||
build: backend/picoclaw-web
|
||||
|
||||
backend/picoclaw-web:
|
||||
cd frontend && pnpm build:backend
|
||||
cd backend && go build -o picoclaw-web .
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue