Skip to content

Commit

Permalink
Fix(demo): Use builded icons for web-twig demo refs #DS-748
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Jul 27, 2023
1 parent 3589d86 commit 17c2a2b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apps/web-twig-demo/docker/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
volumes:
- ./../:/srv/spirit-web-twig-demo/:delegated
- ./../../../packages/web-twig:/srv/spirit-web-twig-bundle/:delegated
- ./../../../packages/icons/src/svg/:/srv/spirit-web-twig-bundle/static/:delegated
- ./../../../packages/icons/dist/svg/:/srv/spirit-web-twig-bundle/static/:delegated
- ./../docker/php/conf.d/app.dev.ini:/usr/local/etc/php/conf.d/app.dev.ini:ro
# If you develop on Mac or Windows you can remove the vendor/ directory
# from the bind-mount for better performance by enabling the next line:
Expand Down
24 changes: 17 additions & 7 deletions packages/web-twig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SHELL = bash

# Paths
APP_DOCKER_DIR = ../../apps/web-twig-demo/docker/
ICONS_PKG_DIR = ../icons/
DOCKER_PKG_DIR = /srv/spirit-web-twig-bundle/

# Docker containers
Expand All @@ -14,13 +15,13 @@ PHP_CONT_PHP = cd $(APP_DOCKER_DIR) && $(DOCKER_COMP) exec --workdir $(DOCKER_PK
# Executables
PHP = $(PHP_CONT_PHP) php
COMPOSER = $(PHP_CONT_PHP) composer
MAKE = $(PHP_CONT_PHP) make
CONT_MAKE = $(PHP_CONT_PHP) make

# Misc
.DEFAULT_GOAL = help
.PHONY = help build up start down logs sh bash composer vendor make phpunit test analyze
.PHONY = help build up prestart start down logs sh bash composer vendor make phpunit test analyze icons-build

## —— 🐳 The Spirit Web Twig Bundle Makefile 🐳 —————————————————————————————————
## —— 🐳 The Spirit Web Twig Bundle Makefile 🐳 ———————————————————————————————
help: ## Outputs this help screen
@grep -E '(^[a-zA-Z0-9_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'

Expand All @@ -44,7 +45,12 @@ down: ## Stop the docker hub
logs: ## Show live logs
cd $(APP_DOCKER_DIR) && $(DOCKER_COMP) logs --tail=0 --follow

start: up vendor encore ## Start the containers
prestart: ## Preparation before start
@if [ ! -d "$(ICONS_PKG_DIR)/dist/svg" ]; then \
$(MAKE) icons-build; \
fi

start: prestart up vendor encore ## Start the containers

stop: down ## Stop the docker hub (alias for `down`)

Expand All @@ -53,7 +59,7 @@ bash: ## Connect to the PHP container

sh: bash ## Connect to the PHP container (alias for `bash`)

## —— Encore 🎵 ————————————————————————————————————————————————————————————————
## —— Encore 🎭 ————————————————————————————————————————————————————————————————

encore-install: ## Install demo dependencies
cd $(APP_DOCKER_DIR) && $(DOCKER_COMP) exec $(DOCKER_ENCORE_SERVICE) yarn install
Expand Down Expand Up @@ -105,7 +111,11 @@ ecs-fix: ## Run composer ecs-fix
test: ## Run composer tests
@$(COMPOSER) tests

## —— Makefile —————————————————————————————————————————————————————————————————
## —— Helpers 🔧 —————————————————————————————————————————————————————————————————
icons-build: ## Build Icons package
cd $(ICONS_PKG_DIR) && yarn build

## —— Makefile 📜 ————————————————————————————————————————————————————————————————
make: ## Run makefile in app pass the parameter "c=" to run a given command, example: make make c=npm-test
@$(eval c ?=)
@$(MAKE) $(c)
@$(CONT_MAKE) $(c)

0 comments on commit 17c2a2b

Please sign in to comment.