mjmlhelper 2.0.5 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/boilerplate/package.json +1 -1
- package/mjmlhelper.js +6 -1
- package/package.json +10 -10
package/README.md
CHANGED
package/boilerplate/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"setup": "mv example.mjmlhelper.json mjmlhelper.json && mv example.gitignore .gitignore",
|
|
8
|
-
"watch": "onchange ./*.mjml ./**/*.mjml --initial --
|
|
8
|
+
"watch": "onchange ./*.mjml ./**/*.mjml --initial --poll 50 --delay 0 --await-write-finish 50 -- onerror \"npm run build\" --title \"watch\" --message \"build failed\" --sound mute",
|
|
9
9
|
"build": "node ./node_modules/mjmlhelper/mjmlhelper.js build",
|
|
10
10
|
"mail": "node ./node_modules/mjmlhelper/mjmlhelper.js mail",
|
|
11
11
|
"cleverreach": "node ./node_modules/mjmlhelper/mjmlhelper.js cleverreach",
|
package/mjmlhelper.js
CHANGED
|
@@ -82,6 +82,8 @@ class mjmlhelper {
|
|
|
82
82
|
data.substring(pos);
|
|
83
83
|
// hide modal overlay
|
|
84
84
|
data = data.substring(0, pos) + ' body.cred_modal:before { display: none !important; } ' + data.substring(pos);
|
|
85
|
+
// fix font size 0 problem (https://github.com/vielhuber/mjmlhelper/issues/1)
|
|
86
|
+
data = data.substring(0, pos) + ' .mce-content-body { font-size: 13px; } ' + data.substring(pos);
|
|
85
87
|
|
|
86
88
|
// placeholders
|
|
87
89
|
data = this.replaceAll(data, '%UNSUBSCRIBE%', '{UNSUBSCRIBE}');
|
|
@@ -105,7 +107,10 @@ class mjmlhelper {
|
|
|
105
107
|
});
|
|
106
108
|
|
|
107
109
|
// first and last tag
|
|
108
|
-
positions = this.findAllPositions(' mj-outlook-group-fix', data)
|
|
110
|
+
positions = this.findAllPositions(' mj-outlook-group-fix', data).concat(
|
|
111
|
+
this.findAllPositions('mj-hero-content', data).concat(
|
|
112
|
+
[]));
|
|
113
|
+
positions.sort();
|
|
109
114
|
shift = 0;
|
|
110
115
|
positions.forEach(positions__value => {
|
|
111
116
|
let begin = data.indexOf('>', positions__value + shift) + '>'.length,
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mjmlhelper",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "mjmlhelper.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@prettier/plugin-php": "^0.
|
|
8
|
-
"archiver": "^3.
|
|
7
|
+
"@prettier/plugin-php": "^0.16.2",
|
|
8
|
+
"archiver": "^5.3.0",
|
|
9
9
|
"cli-error-notifier": "^2.1.0",
|
|
10
|
-
"fs-extra": "^
|
|
10
|
+
"fs-extra": "^9.1.0",
|
|
11
11
|
"ftp": "^0.3.10",
|
|
12
|
-
"jsdom": "^
|
|
13
|
-
"mjml": "^4.
|
|
14
|
-
"nodemailer": "^6.
|
|
15
|
-
"npm": "^6.
|
|
16
|
-
"onchange": "^
|
|
17
|
-
"prettier": "^2.
|
|
12
|
+
"jsdom": "^16.5.1",
|
|
13
|
+
"mjml": "^4.9.0",
|
|
14
|
+
"nodemailer": "^6.5.0",
|
|
15
|
+
"npm": "^7.6.3",
|
|
16
|
+
"onchange": "^7.1.0",
|
|
17
|
+
"prettier": "^2.2.1"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {},
|
|
20
20
|
"scripts": {
|