@maizzle/framework 5.0.0-beta.1 → 5.0.0-beta.3
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maizzle/framework",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.3",
|
|
4
4
|
"description": "Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"dev": "vitest",
|
|
26
|
-
"
|
|
26
|
+
"release": "npx np",
|
|
27
27
|
"pretest": "npm run lint",
|
|
28
|
-
"test": "vitest run --coverage"
|
|
28
|
+
"test": "vitest run --coverage",
|
|
29
|
+
"lint": "biome lint ./src ./test"
|
|
29
30
|
},
|
|
30
31
|
"repository": {
|
|
31
32
|
"type": "git",
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
"html-emails"
|
|
48
49
|
],
|
|
49
50
|
"dependencies": {
|
|
50
|
-
"@csstools/css-calc": "^1.2.
|
|
51
|
+
"@csstools/css-calc": "^1.2.4",
|
|
51
52
|
"@maizzle/cli": "next",
|
|
52
53
|
"cheerio": "^1.0.0-rc.12",
|
|
53
54
|
"chokidar": "^3.6.0",
|
|
@@ -63,11 +64,11 @@
|
|
|
63
64
|
"istextorbinary": "^9.5.0",
|
|
64
65
|
"juice": "^10.0.0",
|
|
65
66
|
"lodash-es": "^4.17.21",
|
|
66
|
-
"morphdom": "^2.7.
|
|
67
|
+
"morphdom": "^2.7.3",
|
|
67
68
|
"ora": "^8.0.1",
|
|
68
69
|
"pathe": "^1.1.2",
|
|
69
|
-
"postcss": "^8.4.
|
|
70
|
-
"postcss-custom-properties": "^13.3.
|
|
70
|
+
"postcss": "^8.4.39",
|
|
71
|
+
"postcss-custom-properties": "^13.3.12",
|
|
71
72
|
"postcss-import": "^16.1.0",
|
|
72
73
|
"postcss-safe-parser": "^7.0.0",
|
|
73
74
|
"posthtml": "^0.16.6",
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
"pretty": "^2.0.0",
|
|
88
89
|
"string-remove-widows": "^4.0.22",
|
|
89
90
|
"string-strip-html": "^13.4.8",
|
|
90
|
-
"tailwindcss": "^3.4.
|
|
91
|
+
"tailwindcss": "^3.4.5",
|
|
91
92
|
"ws": "^8.17.0"
|
|
92
93
|
},
|
|
93
94
|
"devDependencies": {
|
package/src/server/client.js
CHANGED
package/src/server/routes/hmr.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import express from 'express'
|
|
2
2
|
const router = express.Router()
|
|
3
3
|
import fs from 'node:fs/promises'
|
|
4
|
-
import {
|
|
4
|
+
import { cwd } from 'node:process'
|
|
5
5
|
import { fileURLToPath } from 'node:url'
|
|
6
|
+
import { dirname, join, resolve } from 'pathe'
|
|
6
7
|
|
|
7
8
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
8
9
|
|
|
9
10
|
router.get('/hmr.js', async (req, res) => {
|
|
10
11
|
const morphdomScript = await fs.readFile(
|
|
11
|
-
|
|
12
|
+
resolve(cwd(), 'node_modules/morphdom/dist/morphdom-umd.js'),
|
|
12
13
|
'utf8'
|
|
13
14
|
)
|
|
14
15
|
|
|
@@ -56,9 +56,9 @@ export async function run(html = '', config = {}) {
|
|
|
56
56
|
* Rewrite Tailwind CSS class names to email-safe alternatives,
|
|
57
57
|
* unless explicitly disabled
|
|
58
58
|
*/
|
|
59
|
-
if (get(config, 'css.
|
|
59
|
+
if (get(config, 'css.safe') !== false) {
|
|
60
60
|
posthtmlPlugins.push(
|
|
61
|
-
safeClassNames(get(config, 'css.
|
|
61
|
+
safeClassNames(get(config, 'css.safe', {}))
|
|
62
62
|
)
|
|
63
63
|
}
|
|
64
64
|
|
package/types/config.d.ts
CHANGED
|
@@ -136,7 +136,7 @@ export default interface Config {
|
|
|
136
136
|
* ```
|
|
137
137
|
* export default {
|
|
138
138
|
* css: {
|
|
139
|
-
*
|
|
139
|
+
* safe: {
|
|
140
140
|
* ':': '__',
|
|
141
141
|
* '!': 'i-',
|
|
142
142
|
* }
|
|
@@ -144,7 +144,7 @@ export default interface Config {
|
|
|
144
144
|
* }
|
|
145
145
|
* ```
|
|
146
146
|
*/
|
|
147
|
-
|
|
147
|
+
safe?: boolean | Record<string, string>;
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
150
|
* Ensure that all your HEX colors inside `bgcolor` and `color` attributes are defined with six digits.
|