Toggle navigation
Getting started
Try it live
Templates
Components
Community
API
Documentation
Download
Follow these steps to use MJML on your computer
1
Install locally with npm
You can install MJML on OSX, Linux and Windows using
npm
.
$ npm init -y && npm install mjml
Copy
To run MJML, type
$ ./node_modules/.bin/mjml index.mjml
Copy
2
Add it to your path
For a better experience, add MJML to your path
$ export PATH="$PATH:./node_modules/.bin"
Copy
Now, all it takes to run MJML is
$ mjml index.mjml
Copy
After the installation
Some useful command lines to use MJML
Once installed, you can run the engine from the command-line:
$ mjml -r index.mjml
Copy
This will output the compiled HTML to stdout.
You can also watch a file to automatically update the output file (index.html) on any changes:
$ mjml --watch index.mjml -o index.html
Copy
To save the HTML result to a file of your choice use:
$ mjml -r index.mjml -o index.html
Copy
Check out the
usage section
of our documentation to make the use of MJML.
Integrate MJML in your workflow
Plugins are available for Atom and Sublime Text and a desktop app is also available.