Emails
- You need to have installed Node.js https://nodejs.org/en/ (make sure to use version 12.16.3 or above, LTS version is preferred).
- After installation check if node.js and npm are installed run
node -v
andnpm -v
, if you didn't see an error you can clone this repository and use it.
- Clone this repository
- Open terminal in cloned directory
- Run
npm install
to install dependencies
There are few useful NPM scripts.
npm run page {template name}
examplenpm run page train
this script will set train.mjml template and will allow its use with:npm run watch
will watch for changes in MJML template you set in script above and will recompile MJML template into HTML on each change (see folder structure below)npm run build
will compile selected MJML template with minified HTML.
templates/
- contains MJML templatescontent_library/
- contains images for templates.root folder
contains HTMLs which are compiled from MJML templates using npm scriptswatch
andbuild
- MJML documentation
- MJML CLI commands