Email: Use MJML email templates (#57751)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
|
||||
default:
|
||||
- 'clean'
|
||||
- 'assemble'
|
||||
- 'replace'
|
||||
- 'uncss'
|
||||
- 'processhtml'
|
||||
- 'premailer'
|
||||
- 'clean'
|
||||
- 'assemble'
|
||||
- 'replace'
|
||||
- 'copy'
|
||||
|
||||
@@ -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'],
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
module.exports = function () {
|
||||
'use strict';
|
||||
return {
|
||||
txt: {
|
||||
expand: true,
|
||||
cwd: 'dist',
|
||||
src: ['**.txt'],
|
||||
dest: '../public/emails/',
|
||||
},
|
||||
};
|
||||
};
|
||||
@@ -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.
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -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,7 +1,7 @@
|
||||
module.exports = {
|
||||
dist: {
|
||||
overwrite: true,
|
||||
src: ['dist/*.html', 'dist/*.txt'],
|
||||
src: ['dist/*.txt'],
|
||||
replacements: [
|
||||
{
|
||||
from: '[[',
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
module.exports = {
|
||||
dist: {
|
||||
src: ['dist/*.html'],
|
||||
dest: 'dist/css/tidy.css',
|
||||
options: {
|
||||
report: 'min', // optional: include to report savings
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -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,
|
||||
},
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user