summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..bee9968
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,36 @@
+.PHONY: help build run dev test css css-watch install clean
+
+help: ## Show this help message
+ @echo 'Usage: make [target]'
+ @echo ''
+ @echo 'Targets:'
+ @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
+
+install: ## Install all dependencies (Go + npm)
+ go mod download
+ npm install
+
+css: ## Build CSS once
+ npm run build
+
+css-watch: ## Watch CSS for changes
+ npm run dev
+
+build: css ## Build Go binary with CSS
+ go build -o dashboard cmd/dashboard/main.go
+
+run: css ## Build CSS and run server
+ go run cmd/dashboard/main.go
+
+dev: ## Run in development mode (CSS watch + Go server in separate terminals)
+ @echo "Run these in separate terminals:"
+ @echo " Terminal 1: make css-watch"
+ @echo " Terminal 2: go run cmd/dashboard/main.go"
+
+test: ## Run tests
+ go test ./...
+
+clean: ## Clean build artifacts
+ rm -f dashboard
+ rm -f web/static/css/output.css
+ rm -rf node_modules