32 lines
523 B
Makefile
32 lines
523 B
Makefile
.PHONY: all frontend backend test clean
|
|
|
|
all: frontend backend
|
|
|
|
frontend:
|
|
cd web && npm ci && npm run build
|
|
|
|
backend:
|
|
go build -ldflags="-s -w" -o dist/uopi ./cmd/uopi
|
|
|
|
# Build backend without -s -w for debugging
|
|
backend-debug:
|
|
go build -o dist/uopi ./cmd/uopi
|
|
|
|
test:
|
|
go test ./...
|
|
cd web && npm run check
|
|
|
|
lint:
|
|
go vet ./...
|
|
cd web && npm run lint
|
|
|
|
clean:
|
|
rm -rf dist/ web/dist/
|
|
|
|
# Run dev servers (requires two terminals or a process manager)
|
|
run-backend:
|
|
go run ./cmd/uopi
|
|
|
|
run-frontend:
|
|
cd web && npm run dev
|