bryonbean / mjml
MJML Compiler for PHP
1.0.0
2020-11-23 23:19 UTC
Requires
Requires (Dev)
- phpunit/phpunit: ^8.5
This package is auto-updated.
Last update: 2025-02-26 00:20:09 UTC
README
Description
A PHP API for MailJet's mjml transpiler.
Installation
$ composer require bryonbean/mjml
Requirements
- The
npm
executable must be available in PATH. - The node executable must be located at
/usr/local/bin/node
Usage
use Mjml\Factory; use Mjml\Compiler; $mjml = ' <mjml> <mj-body> <mj-section> <mj-raw><p>Hello world</p></mj-raw> </mj-section> </mj-body> </mjml> '; $factory = new Factory(); $compiler = new Compiler($factory); $compiler->compile($mjml, '/path/to/my/template');
Contributing
Pull requests are welcome. For major changes please open an issue first to discuss what you would like to change.