Files
zhealth/Makefile

77 lines
1.8 KiB
Makefile

# zhealth Makefile
# Run `make help` to see available commands
.PHONY: help dev build release lint typecheck test clean serve
# Default target
help:
@echo "Available commands:"
@echo " make dev - Start development servers"
@echo " make build - Build for development"
@echo " make release - Build optimized production bundle"
@echo " make migrate - Run database migrations"
@echo " make lint - Run linters (Clippy + ESLint)"
@echo " make typecheck - Type checking (Rust + TypeScript)"
@echo " make test - Run all tests"
@echo " make serve - Serve production build locally"
@echo " make clean - Clean build artifacts"
# Backend commands
.PHONY: backend-dev backend-build backend-release backend-lint backend-test migrate
migrate:
cd backend && ./target/debug/zhealth migrate
backend-dev:
cd backend && ./target/debug/zhealth serve
backend-build:
cd backend && cargo build
backend-release:
cd backend && cargo build --release
backend-lint:
cd backend && cargo clippy -- -D warnings
backend-test:
cd backend && cargo test
# Frontend commands (placeholder for when frontend is set up)
.PHONY: frontend-dev frontend-build frontend-release frontend-lint frontend-test
frontend-dev:
@echo "Frontend not yet configured"
frontend-build:
@echo "Frontend not yet configured"
frontend-release:
@echo "Frontend not yet configured"
frontend-lint:
@echo "Frontend not yet configured"
frontend-test:
@echo "Frontend not yet configured"
# Combined commands
dev: backend-dev
build: backend-build frontend-build
release: backend-release frontend-release
lint: backend-lint frontend-lint
typecheck: backend-lint frontend-lint
test: backend-test frontend-test
serve:
cd backend && cargo run --release
clean:
cd backend && cargo clean
@echo "Cleaned backend artifacts"