MJML itself does not support i18n feature. This build flow will pipe MJML output html files to gulp-html-i18n
to support localization.
- copy
.env.example
to.env
, and input sendgrid key forMATTERS_SENDGRID_API_KEY
npm run start
to start a hot-reload server to make modificationsnpm run build
for build mjml and i18n html files without start the hot-reload servernpm run upload:dev
to upload build email templates to sendgrid development templatesnpm run upload:prod
to upload build email templates to sendgrid production templates
- add the dynamic templates for all languages for
development
andproduction
environments in SendGrid - create a new mjml file in
src/templates
, update, test and build - config
TEMPLATES
settings fordevelopment
andproduction
environments insrc/updateEmailTemplates.ts
gulp-html-i18n
default template render enginer uses ${{}}$
as delimiters