From 57929a78551217caf3ebd18d7316db2a7153fa12 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Mon, 30 Oct 2023 14:10:29 +0100 Subject: [PATCH] [Dev] Rework stack with domain name & other tweaks --- .eslintignore | 1 + Makefile | 18 ++++++++++++++++-- webpack.config.js | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..dddc0996 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +/webpack.config.js diff --git a/Makefile b/Makefile index 62460831..a0990315 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,13 @@ .SILENT: .PHONY: build +PORT_PREFIX = 429 +PROJECT_DOMAIN = www.rix.ela.ooo + +define manala_project_host +$(PROJECT_DOMAIN)$(if $(1),:$(PORT_PREFIX)$(shell printf "%02d" $(1))) +endef + -include .manala/Makefile ########### @@ -25,12 +32,19 @@ serve: npx concurrently "make serve.php" "make serve.assets" --names="Symfony,Webpack" --prefix=name --kill-others --kill-others-on-fail ## Dev - Start Symfony server +serve.php: export SYMFONY_PORT ?= $(PORT_PREFIX)80 serve.php: - symfony server:start --no-tls + $(call manala_message, Will be available at http://$(call manala_project_host):$(SYMFONY_PORT) ) + -open http://www.rix.ela.ooo:$(SYMFONY_PORT) + symfony server:start --no-tls --port=$(SYMFONY_PORT) ## Dev - Start webpack dev server with HMR (Hot reload) +serve.assets: export WEBPACK_PORT ?= $(PORT_PREFIX)81 serve.assets: - npx encore dev-server --mode=development + npx encore dev-server \ + --mode=development \ + --port=$(WEBPACK_PORT) \ + --host=$(PROJECT_DOMAIN) ## Dev - Watch assets watch.assets: diff --git a/webpack.config.js b/webpack.config.js index 069cca8d..345eb769 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -87,7 +87,7 @@ Encore options.liveReload = true; options.watchFiles = [ 'templates/**/*.twig', - 'content/**/*.yaml', + 'content/**/*.{yaml,md}', ]; }) ;