mjmlio / gulp-mjml

Add Gulp to your MJML workflow!
MIT License
162 stars 37 forks source link

Seeing different output from mjml cli #24

Closed tebatalla closed 7 years ago

tebatalla commented 7 years ago

I have the following mjml file

<mjml> 
  <mj-body>
    <mj-container>
      <mj-section>
          <mj-column>
            <mj-text>
                WTF
            </mj-text>
          </mj-column>
      </mj-section>
    </mj-container>
  </mj-body>
</mjml>

Using the following mjml-cli, I get

mjml test.mjml -o test.html
<div class="" style="cursor:auto;color:#000000;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;text-align:left;">WTF</div>

Using gulp-mjml with the following task settings, I get

gulp.task("mjml", function () {
  var mjmlSrc = jsRoot + "/mjml/templates/**/*.mjml";
  return gulp.src(mjmlSrc)
    .pipe(mjml())
    .pipe(gulp.dest(jsRoot + "/mjml/build"));
});
<div class="" style="cursor:auto;color:#000000;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;text-align:left;"><!--[CDATA[
                WTF
            ]]--></div>

The <!--[CDATA[WTF]]--> output does not display the text in any email clients I've tested using emailonacid.

Node version: v7.4.0 Mjml version: 3.3.2 gulp-mjml version: 2.2.0

ngarnier commented 7 years ago

hey @tebatalla, can you provide more information about your setup?

I think you're using gulp-mjml as part of a bigger project and the cause of this issue seems to be happening somewhere else than in the actual gulp. When trying to reproduce by simply rendering this snippet with mjml-cli and gulp-mjml (with your task), the output is the same.

tebatalla commented 7 years ago

Yeah, I think it was other packages messing with the output. I've tried it in a project built from scratch and it's working the same on both the cli and the task. Sorry for the false alarm!