diff --git a/Makefile b/Makefile index 2d5b30c..f53b9f1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ .DEFAULT_GOAL := help .PHONY: help install rebuild init dev dev-backend dev-frontend build start \ - db-import db-dump admin clean clean-db docker-up docker-down docker-logs + typecheck format db-import db-dump admin clean clean-db \ + docker-up docker-down docker-logs help: @echo "PCA Pijac — available targets:" @@ -10,9 +11,11 @@ help: @echo " make rebuild Rebuild native modules (argon2, sqlite3, sharp)" @echo " make dev Run backend + frontend in dev (parallel)" @echo " make dev-backend Run Directus backend only (nodemon)" - @echo " make dev-frontend Run Next.js frontend only" + @echo " make dev-frontend Run Vite frontend only" @echo " make build Build frontend for production" @echo " make start Start backend + frontend in production mode" + @echo " make typecheck Typecheck frontend (tsc -b --noEmit)" + @echo " make format Prettier format frontend" @echo "" @echo " make db-import Reset data/data.db from schema/dump.sql" @echo " make db-dump Dump current DB to schema/dump.sql" @@ -28,12 +31,9 @@ help: install: pnpm install - cd backend && pnpm install - cd frontend && pnpm install rebuild: - cd backend && pnpm install --force - cd frontend && pnpm install --force + pnpm install --force init: install rebuild db-import @echo "Init complete. Run 'make admin EMAIL=... PASSWORD=...' to create an admin user." @@ -50,9 +50,15 @@ dev-frontend: build: cd frontend && pnpm run build +typecheck: + cd frontend && pnpm run typecheck + +format: + cd frontend && pnpm run format + start: cd backend && pnpm run start & \ - cd frontend && pnpm run start; \ + cd frontend && pnpm run preview; \ wait db-import: @@ -81,7 +87,7 @@ docker-logs: docker compose logs -f clean: - rm -rf node_modules backend/node_modules frontend/node_modules frontend/.next + rm -rf node_modules backend/node_modules frontend/node_modules legacy-frontend/node_modules legacy-frontend/.next clean-db: rm -f data/data.db