From e1688b923e80fb531276c507724ec07f283de9f2 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Thu, 11 Jan 2024 14:47:46 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB(makefile)=20a?= =?UTF-8?q?dd=20command=20to=20interact=20with=20the=20front?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add command: - install-front-desk - start-front-desk-dev --- Makefile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fb4b890..6a9f71b 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,9 @@ MANAGE = $(COMPOSE_RUN_APP) python manage.py MAIL_YARN = $(COMPOSE_RUN) -w /app/src/mail node yarn TSCLIENT_YARN = $(COMPOSE_RUN) -w /app/src/tsclient node yarn +# -- Frontend +PATH_FRONT_DESK = ./src/frontend/app/desk + # ============================================================================== # RULES @@ -65,7 +68,7 @@ data/static: # -- Project -bootstrap: ## Prepare Docker images for the project +bootstrap: ## Prepare Docker images for the project and install frontend dependencies bootstrap: \ data/media \ data/static \ @@ -78,7 +81,8 @@ bootstrap: \ migrate \ i18n-compile \ mails-install \ - mails-build + mails-build \ + install-front-desk .PHONY: bootstrap # -- Docker/compose @@ -265,7 +269,7 @@ mails-install: ## install the mail generator # -- TS client generator -tsclient-install: ## Install the Typescipt API client generator +tsclient-install: ## Install the Typescript API client generator @$(TSCLIENT_YARN) install .PHONY: tsclient-install @@ -283,3 +287,12 @@ help: @echo "Please use 'make $(BOLD)target$(RESET)' where $(BOLD)target$(RESET) is one of:" @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "$(GREEN)%-30s$(RESET) %s\n", $$1, $$2}' .PHONY: help + +# Front +install-front-desk: ## Install the frontend dependencies of app Desk + cd $(PATH_FRONT_DESK) && yarn +.PHONY: install-front-desk + +run-front-desk: ## Start app Desk + cd $(PATH_FRONT_DESK) && yarn dev +.PHONY: run-front-desk