feat: frontend using django-vite + blabla

This commit is contained in:
2026-07-17 18:02:42 +02:00
parent 63a5a69c67
commit c06b184a2d
48 changed files with 13896 additions and 885 deletions
+21 -2
View File
@@ -19,7 +19,7 @@ help: ## Show this help
# --- Setup -----------------------------------------------------------------
.PHONY: install
install: check-uv ## Install dependencies, create .env, migrate, collect static files
install: check-uv frontend ## Install dependencies, build the frontend, migrate, collect static files
$(UV) sync
@$(MAKE) --no-print-directory env # after sync: it needs Django importable
$(MANAGE) migrate
@@ -107,6 +107,25 @@ cron-remove: ## Remove the reminder cron job
cron-test: ## Run the reminder job once, reporting what it would send
$(REMINDER_SH) --dry-run
# --- Frontend --------------------------------------------------------------
.PHONY: frontend
frontend: ## Install npm dependencies and build the Vue frontend
cd frontend && npm install && npm run build
# Only build when no bundle exists yet: tests render the shell template, which
# needs the Vite manifest, but should not pay for a rebuild on every run.
frontend/dist/.vite/manifest.json:
@$(MAKE) --no-print-directory frontend
.PHONY: front-dev
front-dev: ## Run the Vite dev server with hot reload (pair with: DJANGO_VITE_DEV=1 make run)
cd frontend && npm run dev
.PHONY: api-client
api-client: ## Regenerate the typed TS API client (needs 'make run' in another terminal)
cd frontend && npm run generate:api
# --- Development -----------------------------------------------------------
.PHONY: run
@@ -114,7 +133,7 @@ run: ## Run the development server
$(MANAGE) runserver $(PORT)
.PHONY: test
test: ## Run the test suite
test: frontend/dist/.vite/manifest.json ## Run the test suite
$(MANAGE) test
.PHONY: lint