Try it live
Follow these steps to use MJML on your computer
Install locally with npm
You can install MJML on OSX, Linux and Windows using
$ npm init -y && npm install mjml
To run MJML, type
$ ./node_modules/.bin/mjml index.mjml
Add it to your path
For a better experience, add MJML to your path
$ export PATH="$PATH:./node_modules/.bin"
Now, all it takes to run MJML is
$ mjml index.mjml
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
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
To save the HTML result to a file of your choice use:
$ mjml -r index.mjml -o index.html
Check out the
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.