mjmlhelper 2.0.4 → 2.0.8
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/.gitignore +0 -0
- package/README.md +1 -0
- package/boilerplate/_assets/276x165.jpg +0 -0
- package/boilerplate/_assets/32x32.jpg +0 -0
- package/boilerplate/_assets/560x330.jpg +0 -0
- package/boilerplate/_assets/font.woff2 +0 -0
- package/boilerplate/_inc/bottom.mjml +0 -0
- package/boilerplate/_inc/button.mjml +0 -0
- package/boilerplate/_inc/columns-inline.mjml +0 -0
- package/boilerplate/_inc/columns.mjml +0 -0
- package/boilerplate/_inc/divider.mjml +0 -0
- package/boilerplate/_inc/responsive.mjml +0 -0
- package/boilerplate/_inc/simple.mjml +0 -0
- package/boilerplate/_inc/top.mjml +0 -0
- package/boilerplate/_inc/two-col-left.mjml +0 -0
- package/boilerplate/_inc/two-col-right.mjml +0 -0
- package/boilerplate/example.gitignore +0 -0
- package/boilerplate/example.mjmlhelper.json +0 -0
- package/boilerplate/index.html +0 -0
- package/boilerplate/index.mjml +0 -0
- package/boilerplate/package.json +1 -1
- package/mjmlhelper.js +7 -1
- package/package.json +10 -10
package/.gitignore
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/boilerplate/index.html
CHANGED
|
File without changes
|
package/boilerplate/index.mjml
CHANGED
|
File without changes
|
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
|
@@ -105,7 +105,10 @@ class mjmlhelper {
|
|
|
105
105
|
});
|
|
106
106
|
|
|
107
107
|
// first and last tag
|
|
108
|
-
positions = this.findAllPositions(' mj-outlook-group-fix', data)
|
|
108
|
+
positions = this.findAllPositions(' mj-outlook-group-fix', data).concat(
|
|
109
|
+
this.findAllPositions('mj-hero-content', data).concat(
|
|
110
|
+
[]));
|
|
111
|
+
positions.sort();
|
|
109
112
|
shift = 0;
|
|
110
113
|
positions.forEach(positions__value => {
|
|
111
114
|
let begin = data.indexOf('>', positions__value + shift) + '>'.length,
|
|
@@ -126,6 +129,9 @@ class mjmlhelper {
|
|
|
126
129
|
data = data.substring(0, end) + '<!--#/html#-->' + data.substring(end);
|
|
127
130
|
shift += '<!--#html #-->'.length + '<!--#/html#-->'.length;
|
|
128
131
|
});
|
|
132
|
+
// prevent nested html tags (cleverreach has problems with that)
|
|
133
|
+
data = data.replace(/(<!--#html #-->)(((?!<!--#\/html#-->).)*(<!--#html #-->))/gs,'$2');
|
|
134
|
+
data = data.replace(/((<!--#\/html#-->)((?!<!--#html #-->).)*)(<!--#\/html#-->)/gs,'$1');
|
|
129
135
|
|
|
130
136
|
return data;
|
|
131
137
|
}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mjmlhelper",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
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": {
|