Skip to content

Commit

Permalink
fix(mjml)!: Removed MJML support
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Aug 20, 2024
1 parent 93d22f4 commit 1f105de
Show file tree
Hide file tree
Showing 6 changed files with 504 additions and 2,074 deletions.
6 changes: 1 addition & 5 deletions .ncurc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ module.exports = {
upgrade: true,
reject: [
// no support for Node 16
'marked',

// esm issues
'js-beautify',
'mjml'
'marked'
]
};
47 changes: 0 additions & 47 deletions examples/mjml.js

This file was deleted.

7 changes: 3 additions & 4 deletions lib/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
'use strict';

const moment = require('moment');
const mjml2html = require('mjml');
const marked = require('marked');
const Handlebars = require('handlebars');

Expand Down Expand Up @@ -133,9 +132,9 @@ function getTemplate(options) {
return data => {
switch ((format || '').toLowerCase().trim()) {
case 'mjml': {
let compiler = getCompiler(source, true);
let rendered = mjml2html(compiler(data), rendererOpts);
return rendered.html;
let error = new Error('MJML not supported');
error.code = 'NotSupported';
throw error;
}

case 'markdown': {
Expand Down
Loading

0 comments on commit 1f105de

Please sign in to comment.