-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: set up mjml for building email templates
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"options": { | ||
"minifyOptions": { | ||
"minifyCSS": true | ||
} | ||
}, | ||
"packages": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
MJML=npx mjml | ||
MJML_FILES=$(wildcard mjml/*.mjml) | ||
HTML_DIR=html | ||
|
||
build: | ||
$(foreach file, $(MJML_FILES), $(MJML) $(file) --config.minify --config.useMjmlConfigOptions -o $(HTML_DIR)/$(basename $(notdir $(file))).html;) | ||
|
||
.PHONY=build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## Email templates | ||
|
||
These email templates are generated using [MJML](https://mjml.io/). It may be | ||
helpful to add an [IDE extension](https://documentation.mjml.io/#development) to | ||
aid in development. | ||
|
||
## Build templates | ||
|
||
All templates in the `mjml` directory can be built by running the following command: | ||
|
||
``` | ||
make build | ||
``` |