Merge 4db27adb48 into 9bade4690c
This commit is contained in:
commit
4d2f4e697a
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
|
# Run both frontend and backend dev servers
|
||||||
dev:
|
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..."
|
@echo "Starting backend and frontend dev servers..."
|
||||||
@$(MAKE) dev-backend & $(MAKE) dev-frontend
|
@$(MAKE) dev-backend & $(MAKE) dev-frontend
|
||||||
|
|
||||||
|
|
@ -14,7 +18,9 @@ dev-backend:
|
||||||
cd backend && go run .
|
cd backend && go run .
|
||||||
|
|
||||||
# Build frontend and embed into Go binary
|
# Build frontend and embed into Go binary
|
||||||
build:
|
build: backend/picoclaw-web
|
||||||
|
|
||||||
|
backend/picoclaw-web:
|
||||||
cd frontend && pnpm build:backend
|
cd frontend && pnpm build:backend
|
||||||
cd backend && go build -o picoclaw-web .
|
cd backend && go build -o picoclaw-web .
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue