Add local development build workflow
- Add Makefile targets: install, type-check, lint, build-local - Add type-check script to backend/package.json - Create backend/.gitignore for build artifacts Enables quick TypeScript error detection without Docker rebuilds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
52
Makefile
52
Makefile
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: help setup start stop clean logs shell-backend shell-frontend migrate rebuild traefik-dashboard traefik-logs service-discovery network-inspect health-check-all mobile-setup db-shell-app
|
.PHONY: help setup start stop clean logs shell-backend shell-frontend migrate rebuild traefik-dashboard traefik-logs service-discovery network-inspect health-check-all mobile-setup db-shell-app install type-check lint build-local
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "MotoVaultPro - Simplified 5-Container Architecture"
|
@echo "MotoVaultPro - Simplified 5-Container Architecture"
|
||||||
@@ -25,6 +25,12 @@ help:
|
|||||||
@echo ""
|
@echo ""
|
||||||
@echo "Database Access (Container-Only):"
|
@echo "Database Access (Container-Only):"
|
||||||
@echo " make db-shell-app - Application database shell"
|
@echo " make db-shell-app - Application database shell"
|
||||||
|
@echo ""
|
||||||
|
@echo "Local Development (No Docker):"
|
||||||
|
@echo " make install - Install npm dependencies locally"
|
||||||
|
@echo " make type-check - Run TypeScript type checks"
|
||||||
|
@echo " make lint - Run ESLint on all code"
|
||||||
|
@echo " make build-local - Build frontend and backend locally"
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
@echo "Setting up MotoVaultPro K8s-ready development environment..."
|
@echo "Setting up MotoVaultPro K8s-ready development environment..."
|
||||||
@@ -194,3 +200,47 @@ db-import-file:
|
|||||||
db-backup:
|
db-backup:
|
||||||
@echo "Creating database backup..."
|
@echo "Creating database backup..."
|
||||||
@./scripts/export-database.sh --output backup_$(shell date +%Y%m%d_%H%M%S)
|
@./scripts/export-database.sh --output backup_$(shell date +%Y%m%d_%H%M%S)
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# Local Development (No Docker Required)
|
||||||
|
# =============================================================================
|
||||||
|
# Use these commands to quickly check for TypeScript errors and linting issues
|
||||||
|
# without rebuilding Docker containers.
|
||||||
|
|
||||||
|
.PHONY: install type-check lint build-local
|
||||||
|
|
||||||
|
install:
|
||||||
|
@echo "Installing dependencies locally..."
|
||||||
|
@cd frontend && npm install
|
||||||
|
@cd backend && npm install
|
||||||
|
@echo "Dependencies installed!"
|
||||||
|
|
||||||
|
type-check:
|
||||||
|
@echo "Running TypeScript type checks..."
|
||||||
|
@echo "Frontend:"
|
||||||
|
@cd frontend && npm run type-check
|
||||||
|
@echo ""
|
||||||
|
@echo "Backend:"
|
||||||
|
@cd backend && npm run type-check
|
||||||
|
@echo ""
|
||||||
|
@echo "Type checks complete!"
|
||||||
|
|
||||||
|
lint:
|
||||||
|
@echo "Running linters..."
|
||||||
|
@echo "Frontend:"
|
||||||
|
@cd frontend && npm run lint
|
||||||
|
@echo ""
|
||||||
|
@echo "Backend:"
|
||||||
|
@cd backend && npm run lint
|
||||||
|
@echo ""
|
||||||
|
@echo "Linting complete!"
|
||||||
|
|
||||||
|
build-local:
|
||||||
|
@echo "Building frontend and backend locally..."
|
||||||
|
@echo "Frontend:"
|
||||||
|
@cd frontend && npm run build
|
||||||
|
@echo ""
|
||||||
|
@echo "Backend:"
|
||||||
|
@cd backend && npm run build
|
||||||
|
@echo ""
|
||||||
|
@echo "Build complete! Check frontend/dist and backend/dist"
|
||||||
|
|||||||
22
backend/.gitignore
vendored
Normal file
22
backend/.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# Dependencies
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Build output
|
||||||
|
dist/
|
||||||
|
|
||||||
|
# Test coverage
|
||||||
|
coverage/
|
||||||
|
.nyc_output/
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Editor
|
||||||
|
.DS_Store
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
@@ -14,7 +14,8 @@
|
|||||||
"migrate:all": "ts-node src/_system/migrations/run-all.ts",
|
"migrate:all": "ts-node src/_system/migrations/run-all.ts",
|
||||||
"migrate:feature": "ts-node src/_system/migrations/run-feature.ts",
|
"migrate:feature": "ts-node src/_system/migrations/run-feature.ts",
|
||||||
"schema:generate": "ts-node src/_system/schema/generate.ts",
|
"schema:generate": "ts-node src/_system/schema/generate.ts",
|
||||||
"lint": "eslint src"
|
"lint": "eslint src",
|
||||||
|
"type-check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pg": "^8.13.1",
|
"pg": "^8.13.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user