wix-incubator/mjml-react

Export like mjml

Closed this issue · 4 comments

Hello,
Nice work !

Is there a way to export mjml-react like mjml command line do ?

Thanks

Hey @fmaillet24

Could you provide some link to documentation/resource/example,
I am not really sure I get the issue/question.

Do You need some API which compiles and returns either MJML or HTML syntax ?

import { render, renderToMjml } from 'mjml-react';

const email = (<Mjml>...</Mjml>);

console.log(render(email)); // will print out the HTML
console.log(renderToMjtml(email)); // will print out the MJML

Hello,

Sorry if I was not clear,
I'm just looking for something like mjml [input] -o path.html.
I need to export a lot of template to html.
I wrote something custom, but I just wanted to know if I missed something from mjml-react.

Thanks a lot
Have a nice day

Hey,

Are your templates written in react or in mjml ? If it's react, then what bundler or transpiler do you use ?
Maybe your project is public and you could share the link ?

Regards

As there is no activity on this issue I'm closing it.