0.2.0 • Published 7 years ago

mailplate v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

###Experimental This project is still in early development. Proceed with caution, breaking changes will be coming

Only tested with nunjucks

###Installation

npm install mailplate -s

###Usage

var Mailplate = require('mailplate');
var nunjucks = require('nunjucks');

var mailplate = new Mailplate({
  renderer: nunjucks
});

mailplate.render('./hello.nunj', {
  name: 'World',
}, function(err, result){
  console.log(err, result);
});

hello.nunj

<mjml>
  <mj-body>
    <mj-container>
      <mj-section>
        <mj-column>
          <mj-text align="center">
            Hello {{ name }}!
          </mj-text>
        </mj-column>
      </mj-section>
    </mj-container>
  </mj-body>
</mjml>

Caveats

  • You cannot use <mj-include path="template.mjml"> instead use your template engines include function in nunjucks this is {% include "template.html" %}
0.2.0

7 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago