How to use the mjml-migrate.handleMjml3 function in mjml-migrate

To help you get started, we’ve selected a few mjml-migrate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mjmlio / mjml / packages / mjml-core / src / index.js View on Github external
mjmlConfigPath = null,
    noMigrateWarn = false,
  } = options

  // if mjmlConfigPath is specified then we need to handle it on each call
  if (mjmlConfigPath) handleMjmlConfig(mjmlConfigPath, registerComponent)

  if (typeof mjml === 'string') {
    mjml = MJMLParser(mjml, {
      keepComments,
      components,
      filePath,
    })
  }

  mjml = handleMjml3(mjml, { noMigrateWarn })

  const globalDatas = {
    backgroundColor: '',
    breakpoint: '480px',
    classes: {},
    classesDefault: {},
    defaultAttributes: {},
    fonts,
    inlineStyle: [],
    headStyle: {},
    componentsHeadStyle: [],
    headRaw: [],
    mediaQueries: {},
    preview: '',
    style: [],
    title: '',

mjml-migrate

A tool to migrate a template from MJML 3 to MJML 4

MIT
Latest version published 6 months ago

Package Health Score

87 / 100
Full package analysis

Popular mjml-migrate functions

Similar packages