-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (38 loc) · 1.07 KB
/
Makefile
File metadata and controls
46 lines (38 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.PHONY: dev backend frontend build clean install vet update
# Run both backend and frontend for local development
dev:
@trap 'kill 0' EXIT; \
$(MAKE) backend & \
$(MAKE) frontend & \
wait
# Run the Go backend
backend:
cd backend && go run ./cmd/kcogs
# Run the React frontend dev server
frontend:
cd frontend && npm run dev
# Install dependencies
install:
cd frontend && npm install
cd backend && go mod download
# Update dependencies to latest versions
update:
cd backend && go get -u ./... && go mod tidy
cd frontend && npx npm-check-updates -u && npm install
# Build for production (single binary with embedded frontend)
build:
cd frontend && npm run build
rm -rf backend/internal/api/dist
cp -r frontend/dist backend/internal/api/dist
cd backend && go build -o bin/kcogs ./cmd/kcogs
# Run go vet and staticcheck on backend
vet:
cd backend && go vet ./...
cd backend && staticcheck ./...
# Clean build artifacts
clean:
rm -rf backend/bin
rm -rf frontend/dist
rm -rf backend/internal/api/dist
mkdir -p backend/internal/api/dist
touch backend/internal/api/dist/.gitkeep