1.1.6 • Published 16 days ago

jsrender-mjml v1.1.6

Weekly downloads
-
License
MIT
Repository
-
Last release
16 days ago

Installation

$ npm install -g jsrender-mjml

Usage

$ jsrender-mjml -h

  Usage: jsrender-mjml [options]

  Options:

    -V, --version       output the version number
    -p, --port <n>      port of server (default: 1410)
    --hostname [value]  port of server (default: 127.0.0.1)
    -h, --help          output usage information

Example request

POST request json parameters:

  • mjml (required)- template in MJML notation with JSRender syntax
  • jsonData (optional)- JSON data for render MJML template
  • skipJSRender (optional) - flag for skipping JSRender processing part of pipeline
  • secondPass (optional) - flag for 2-pass resolve of JSON data (rawData), nested variables will be replaced up to depth 2
$ curl localhost:1410 -d '{ "mjml": "<mjml><mj-body><mj-section><mj-column><mj-text>{{:greeting}}</mj-text></mj-column></mj-section></mj-body></mjml>","jsonData" : {"greeting": "Hello World{{:ivar}}", "ivar" : "!" }, "secondPass": true}'

    <!doctype html>
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
      <head>
        <title>
...
1.1.6

16 days ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.5

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago