@travetto/email-compiler 8.0.0-alpha.28 → 8.0.0-alpha.29
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/package.json +10 -11
- package/src/util.ts +8 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/email-compiler",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Email compiling module",
|
|
6
6
|
"keywords": [
|
|
@@ -27,20 +27,19 @@
|
|
|
27
27
|
"directory": "module/email-compiler"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@
|
|
31
|
-
"@travetto/
|
|
32
|
-
"@travetto/
|
|
33
|
-
"@travetto/
|
|
34
|
-
"@travetto/
|
|
35
|
-
"@travetto/
|
|
36
|
-
"@
|
|
30
|
+
"@css-inline/css-inline": "^0.21.1",
|
|
31
|
+
"@travetto/config": "^8.0.0-alpha.26",
|
|
32
|
+
"@travetto/di": "^8.0.0-alpha.23",
|
|
33
|
+
"@travetto/email": "^8.0.0-alpha.27",
|
|
34
|
+
"@travetto/image": "^8.0.0-alpha.23",
|
|
35
|
+
"@travetto/runtime": "^8.0.0-alpha.23",
|
|
36
|
+
"@travetto/worker": "^8.0.0-alpha.24",
|
|
37
37
|
"html-entities": "^2.6.0",
|
|
38
|
-
"inline-css": "^4.0.3",
|
|
39
38
|
"purgecss": "^8.0.0",
|
|
40
|
-
"sass": "^1.
|
|
39
|
+
"sass": "^1.103.1"
|
|
41
40
|
},
|
|
42
41
|
"peerDependencies": {
|
|
43
|
-
"@travetto/cli": "^8.0.0-alpha.
|
|
42
|
+
"@travetto/cli": "^8.0.0-alpha.32"
|
|
44
43
|
},
|
|
45
44
|
"peerDependenciesMeta": {
|
|
46
45
|
"@travetto/cli": {
|
package/src/util.ts
CHANGED
|
@@ -116,18 +116,14 @@ export class EmailCompileUtil {
|
|
|
116
116
|
*/
|
|
117
117
|
static async inlineCss(html: string, css: string): Promise<string> {
|
|
118
118
|
// Inline css
|
|
119
|
-
const {
|
|
120
|
-
return
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
removeLinkTags: true,
|
|
128
|
-
applyStyleTags: true
|
|
129
|
-
}
|
|
130
|
-
);
|
|
119
|
+
const { inline } = await import('@css-inline/css-inline');
|
|
120
|
+
return inline(html, {
|
|
121
|
+
extraCss: css,
|
|
122
|
+
keepAtRules: true,
|
|
123
|
+
keepStyleTags: false,
|
|
124
|
+
keepLinkTags: false,
|
|
125
|
+
loadRemoteStylesheets: false
|
|
126
|
+
});
|
|
131
127
|
}
|
|
132
128
|
|
|
133
129
|
/**
|