Email: Use MJML email templates (#57751)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
This commit is contained in:
Gilles De Mey
2022-11-17 21:41:46 +01:00
committed by GitHub
parent 18738cfd77
commit ea27eca147
56 changed files with 3073 additions and 3553 deletions
+4 -7
View File
@@ -1,8 +1,5 @@
default:
- 'clean'
- 'assemble'
- 'replace'
- 'uncss'
- 'processhtml'
- 'premailer'
- 'clean'
- 'assemble'
- 'replace'
- 'copy'
+1 -10
View File
@@ -2,21 +2,12 @@ module.exports = function () {
'use strict';
return {
options: {
partials: ['templates/partials/*.hbs'],
helpers: ['templates/helpers/**/*.js'],
data: [],
flatten: true,
},
html: {
options: {
layout: 'templates/layouts/default.html',
},
src: ['templates/*.html'],
dest: 'dist/',
},
txt: {
options: {
layout: 'templates/layouts/default.txt',
layout: 'templates/partials/layout/default.txt',
ext: '.txt',
},
src: ['templates/*.txt'],
+11
View File
@@ -0,0 +1,11 @@
module.exports = function () {
'use strict';
return {
txt: {
expand: true,
cwd: 'dist',
src: ['**.txt'],
dest: '../public/emails/',
},
};
};
-31
View File
@@ -1,31 +0,0 @@
module.exports = {
html: {
options: {
verbose: true,
removeComments: true,
},
files: [
{
expand: true, // Enable dynamic expansion.
cwd: 'dist', // Src matches are relative to this path.
src: ['*.html'], // Actual pattern(s) to match.
dest: '../public/emails/', // Destination path prefix.
},
],
},
txt: {
options: {
verbose: true,
mode: 'txt',
lineLength: 90,
},
files: [
{
expand: true, // Enable dynamic expansion.
cwd: 'dist', // Src matches are relative to this path.
src: ['*.txt'], // Actual patterns to match.
dest: '../public/emails/', // Destination path prefix.
},
],
},
};
-12
View File
@@ -1,12 +0,0 @@
module.exports = {
dist: {
files: [
{
expand: true, // Enable dynamic expansion.
cwd: 'dist', // Src matches are relative to this path.
src: ['*.html'], // Actual pattern(s) to match.
dest: 'dist/', // Destination path prefix.
},
],
},
};
+1 -1
View File
@@ -1,7 +1,7 @@
module.exports = {
dist: {
overwrite: true,
src: ['dist/*.html', 'dist/*.txt'],
src: ['dist/*.txt'],
replacements: [
{
from: '[[',
-9
View File
@@ -1,9 +0,0 @@
module.exports = {
dist: {
src: ['dist/*.html'],
dest: 'dist/css/tidy.css',
options: {
report: 'min', // optional: include to report savings
},
},
};
-16
View File
@@ -1,16 +0,0 @@
module.exports = {
src: {
files: [
//what are the files that we want to watch
'assets/css/*.css',
'templates/**/*.html',
'templates/**/*.txt',
'grunt/*.js',
],
tasks: ['default'],
options: {
nospawn: true,
livereload: false,
},
},
};