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 CHANGED
@@ -11,6 +11,7 @@ it also includes a small boilerplate and some nifty updates for mjml.
11
11
  ## installation
12
12
 
13
13
  ```
14
+ npm init -y
14
15
  npm install mjmlhelper
15
16
  ```
16
17
 
@@ -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 --wait --delay 100 --await-write-finish 200 -- onerror \"npm run build\" --title \"watch\" --message \"build failed\" --sound mute",
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.5",
3
+ "version": "2.0.9",
4
4
  "description": "",
5
5
  "main": "mjmlhelper.js",
6
6
  "dependencies": {
7
- "@prettier/plugin-php": "^0.14.2",
8
- "archiver": "^3.1.1",
7
+ "@prettier/plugin-php": "^0.16.2",
8
+ "archiver": "^5.3.0",
9
9
  "cli-error-notifier": "^2.1.0",
10
- "fs-extra": "^8.1.0",
10
+ "fs-extra": "^9.1.0",
11
11
  "ftp": "^0.3.10",
12
- "jsdom": "^15.2.0",
13
- "mjml": "^4.5.1",
14
- "nodemailer": "^6.3.1",
15
- "npm": "^6.12.0",
16
- "onchange": "^6.1.0",
17
- "prettier": "^2.0.5"
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": {