yarn mjml 4.0.0-alpha.5

latest releases: 5.0.0-alpha.4, 5.0.0-alpha.3, 5.0.0-alpha.2...
6 years ago

Breaking changes

  • mj-social now has a new syntax (see here)
  • mj-hero-content no longer exists (mj-hero now behaves like a mj-section with a single mj-column)
  • the customComponent API is a release candidate. Please submit feedback here: #880

Features

  • mjml-core can now receive a skeleton function to redefine the default skeleton (default HTML generated by a MJML boilerplate)
  • mjml-cli has been totally redone from scratch
  • mjml-cli --watch now supports multiple files (we need heavy testing here with nested includes)
  • mj-hero is now supported in MJML 4
  • Creating custom components now support this.renderMJML to render MJML inside a component (just use the regular MJML syntax inside your custom component)
  • this.htmlAttributes in a custom component now detects if you pass a style key or an object
  • If you want to display the desktop layout on Outlook.com instead of the mobile fallback, you can automatically do this with the owa attribute on the mjml tag: <mjml owa="desktop"> (set to mobile by default at the moment). It should be the only client specific attribute in MJML

Fixes

  • mjml -V should now output the right version ( cli + core )
  • mj-column now properly convert % into px for Outlook comments
  • mj-group should now behave as in MJML 3.3.5 👍

Final notes :

The good :

  • 3 components need to be ported back in MJML4 👍 then we can flag MJML4 as a beta product
  • MJML 3.3.5 will no longer be master and will be a legacy branch like 1.X and 2.X
  • New contributions from the community ! Thanks to @ogonkov & @dhcdata for opening PRs

The bad :
We're kind of late on schedule, type system took too much time and will be delayed for MJML 4.1. The type system will check the format of any mj-attribute and provide useful debug tips when the unit used is the wrong one.

Don't miss a new mjml release

NewReleases is sending notifications on new releases.