Email rendering for the worker — MJML owns the bulletproof email HTML, Eta templates the .mjml files (data + presentation logic + layout/partials). - mjml.ts: compileMjml() wraps mjml v5's async mjml2html (validationLevel soft), throws on errors; typed via @types/mjml (matches the v5 async API). - render.ts: an Eta instance over src/email/templates (resolved via import.meta.dirname, so it works in tests and from dist); renderEmail(name, data) -> Eta -> MJML -> HTML. - templates/_layout.mjml (shared wrapper) + render-probe.mjml (smoke template exercising layout, loop, conditional, escaping). - build:assets copies templates/ into dist; build/dev chain it. .prettierignore excludes the templates (no MJML/Eta parser). mjml/eta/@types/mjml pinned.
7 lines
127 B
Plaintext
7 lines
127 B
Plaintext
build/
|
|
dist/
|
|
coverage/
|
|
|
|
# MJML + Eta template markup — hand-maintained; prettier has no MJML/Eta parser
|
|
src/email/templates/
|