chore(makefile): add parity targets and seeding
This commit is contained in:
55
Makefile
55
Makefile
@@ -14,7 +14,12 @@ DOCKER_IMAGE ?= $(APP_NAME):latest
|
||||
|
||||
export
|
||||
|
||||
.PHONY: help install clean dev build test docker-build docker-buildx docker-run docker-clean info couchdb-up couchdb-down
|
||||
.PHONY: help install clean \
|
||||
dev preview build \
|
||||
test test-watch test-coverage test-fast test-services test-integration \
|
||||
lint lint-fix format format-check type-check \
|
||||
docker-build docker-buildx docker-run docker-clean \
|
||||
seed couchdb-up couchdb-down info
|
||||
|
||||
# Default target
|
||||
.DEFAULT_GOAL := help
|
||||
@@ -53,6 +58,10 @@ dev: ## Start development server
|
||||
@echo "Starting $(APP_NAME) development server..."
|
||||
@bun run dev
|
||||
|
||||
preview: ## Serve production build locally
|
||||
@echo "Starting $(APP_NAME) preview server..."
|
||||
@bun run preview
|
||||
|
||||
build: ## Build the application
|
||||
@echo "Building $(APP_NAME) application..."
|
||||
@bun run build
|
||||
@@ -67,6 +76,44 @@ test-watch: ## Run unit tests in watch mode
|
||||
@echo "Running $(APP_NAME) tests in watch mode..."
|
||||
@bun run test:watch
|
||||
|
||||
test-coverage: ## Run tests with coverage report
|
||||
@echo "Running $(APP_NAME) tests with coverage..."
|
||||
@bun run test:coverage
|
||||
|
||||
test-fast: ## Run fast unit test subset
|
||||
@echo "Running fast unit test subset..."
|
||||
@bun run test:fast
|
||||
|
||||
test-services: ## Run service layer tests only
|
||||
@echo "Running service layer tests..."
|
||||
@bun run test:services
|
||||
|
||||
test-integration: ## Run integration tests
|
||||
@echo "Running integration tests..."
|
||||
@bun run test:integration
|
||||
|
||||
##@ Quality
|
||||
|
||||
lint: ## Run ESLint
|
||||
@echo "Linting $(APP_NAME)..."
|
||||
@bun run lint
|
||||
|
||||
lint-fix: ## Run ESLint with autofix
|
||||
@echo "Linting $(APP_NAME) with auto-fix..."
|
||||
@bun run lint:fix
|
||||
|
||||
format: ## Format code with Prettier
|
||||
@echo "Formatting $(APP_NAME) code..."
|
||||
@bun run format
|
||||
|
||||
format-check: ## Check code formatting without writing changes
|
||||
@echo "Checking $(APP_NAME) formatting..."
|
||||
@bun run format:check
|
||||
|
||||
type-check: ## Run TypeScript type checking
|
||||
@echo "Type-checking $(APP_NAME)..."
|
||||
@bun run type-check
|
||||
|
||||
##@ Docker
|
||||
|
||||
docker-build: ## Build Docker image for local development
|
||||
@@ -102,6 +149,12 @@ docker-clean: ## Clean Docker resources and containers
|
||||
@docker image prune -f 2>/dev/null || true
|
||||
@docker container prune -f 2>/dev/null || true
|
||||
|
||||
##@ Database
|
||||
|
||||
seed: ## Seed default admin user into CouchDB
|
||||
@echo "Seeding default admin account..."
|
||||
@bun run seed
|
||||
|
||||
##@ Test Services
|
||||
|
||||
couchdb-up: ## Start local CouchDB for integration tests
|
||||
|
||||
Reference in New Issue
Block a user