-
Notifications
You must be signed in to change notification settings - Fork 0
2. Quick Start
Johann Buscail edited this page Oct 16, 2021
·
2 revisions
After downloading the package, simply import the module:
import { mjml2HTMLParser } from "@wavychat/mjml-parser";To convert your MJML template to HTML with variables, simply do:
const html = await mjml2HTMLParser({
mjmlPath: __dirname + "/MY_MJML_FILE",
template: {
engine: "ejs", // can be ejs, handlebars, underscore
vars: {
MY_VARIABLE: "MY_VALUE",
}
}
});