From 11eca4437427b029c38ddedd8dd755b79a382902 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Sun, 6 Dec 2020 23:52:08 +0100 Subject: [PATCH] Add converter for mjml template --- Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Makefile b/Makefile index e0729c0..b8b302e 100644 --- a/Makefile +++ b/Makefile @@ -25,3 +25,18 @@ clean: ## remove build artifacts test: build ./test.sh + +npm: + npm install + + +MJML_TEMPLATES=$(wildcard templates/*.mjml) +MJML_OUTPUT=$(patsubst %.mjml,%.mjml.html,$(MJML_TEMPLATES)) + +%.mjml.html: %.mjml + npx mjml $< --config.minify > $@ + +templates: $(MJML_OUTPUT) + +.PHONY: templates +