- Portage des fonctionnalités de la branche main

- Ajout de node et npm dans la Dockerfile

- Ajout des Factories et Fixtures

- Ajout de npm-install dans Make install
This commit is contained in:
Jérémy Guillot
2024-06-03 19:41:24 +02:00
parent 41a1a8c44c
commit 291e85338a
53 changed files with 11825 additions and 18 deletions

View File

@@ -1,8 +1,10 @@
# Executables (local)
DOCKER_COMP = docker compose
DOCKER_COMP_EXEC:=$(DOCKER_COMP) exec
# Docker containers
PHP_CONT = $(DOCKER_COMP) exec php
PHP_CONT = $(DOCKER_COMP_EXEC) php
# Executables
PHP = $(PHP_CONT) php
@@ -12,7 +14,7 @@ SF_MEMORY = $(PHP) -d memory_limit=256M bin/console
# Misc
.DEFAULT_GOAL = help
.PHONY : help build start install down stop logs sh composer vendor sf cc test phpmd phpcs quality fix-permissions controller entity migration migration-diff migration-migrate form crud fixtures command auth subscriber state-processor state-provider
.PHONY : help build start install down stop logs sh composer vendor sf cc test phpmd phpcs quality fix-permissions controller entity migration migration-diff migration-migrate form crud fixtures command auth subscriber state-processor state-provider npm-install npm-run npm-watch
## —— 🎵 🐳 The Symfony Docker Makefile 🐳 🎵 ——————————————————————————————————
help: ## Outputs this help screen
@@ -25,7 +27,7 @@ build: ## Builds the Docker images
start: ## Start the docker hub in detached mode (no logs)
@$(DOCKER_COMP) up --pull always -d --wait
install: build start vendor## Build and start the containers
install: build start vendor npm-install## Build and start the containers
down: ## Stop and remove the docker hub
@$(DOCKER_COMP) down --remove-orphans
@@ -123,3 +125,13 @@ state-processor: ## Create a new state processor
state-provider: ## Create a new state provider
@$(SYMFONY) make:state-provider
## —— Webpack Encore —————————————————————————————————————————————————————————————
npm-install: ## Install npm dependencies
@$(DOCKER_COMP) exec php npm install
npm-run: ## Run the dev server
@$(DOCKER_COMP) exec php npm run dev
npm-watch: ## Watch for changes
@$(DOCKER_COMP) exec php npm run watch