@maizzle/framework 4.0.0-alpha.6 → 4.0.0-alpha.7
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 +86 -86
- package/src/commands/serve.js +5 -1
package/package.json
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@maizzle/framework",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
4
|
-
"description": "Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"main": "src/index.js",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/maizzle/framework.git"
|
|
10
|
-
},
|
|
11
|
-
"bugs": "https://github.com/maizzle/framework/issues",
|
|
12
|
-
"homepage": "https://maizzle.com",
|
|
13
|
-
"author": "Cosmin Popovici (https://github.com/cossssmin)",
|
|
14
|
-
"keywords": [
|
|
15
|
-
"maizzle",
|
|
16
|
-
"tailwindcss",
|
|
17
|
-
"responsive-email",
|
|
18
|
-
"email-framework",
|
|
19
|
-
"email-template",
|
|
20
|
-
"email-marketing",
|
|
21
|
-
"email-campaigns",
|
|
22
|
-
"email-newsletter",
|
|
23
|
-
"email-boilerplate",
|
|
24
|
-
"html-emails"
|
|
25
|
-
],
|
|
26
|
-
"publishConfig": {
|
|
27
|
-
"access": "public"
|
|
28
|
-
},
|
|
29
|
-
"scripts": {
|
|
30
|
-
"test": "c8 ava -s",
|
|
31
|
-
"pretest": "xo",
|
|
32
|
-
"style": "xo",
|
|
33
|
-
"release": "np"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"autoprefixer": "^10.4.0",
|
|
37
|
-
"browser-sync": "^2.26.13",
|
|
38
|
-
"color-shorthand-hex-to-six-digit": "^3.0.2",
|
|
39
|
-
"email-comb": "^5.0.0",
|
|
40
|
-
"front-matter": "^4.0.0",
|
|
41
|
-
"fs-extra": "^10.0.0",
|
|
42
|
-
"glob-promise": "^4.1.0",
|
|
43
|
-
"html-crush": "^4.0.0",
|
|
44
|
-
"is-url-superb": "^5.0.0",
|
|
45
|
-
"juice": "^8.0.0",
|
|
46
|
-
"lodash": "^4.17.20",
|
|
47
|
-
"ora": "^5.1.0",
|
|
48
|
-
"postcss": "^8.4.4",
|
|
49
|
-
"postcss-import": "^14.0.0",
|
|
50
|
-
"postcss-merge-longhand": "^5.0.1",
|
|
51
|
-
"posthtml": "^0.16.6",
|
|
52
|
-
"posthtml-attrs-parser": "^0.1.1",
|
|
53
|
-
"posthtml-base-url": "^1.0.1",
|
|
54
|
-
"posthtml-content": "^0.0.3",
|
|
55
|
-
"posthtml-expressions": "^1.8.1",
|
|
56
|
-
"posthtml-extend": "^0.6.0",
|
|
57
|
-
"posthtml-extra-attributes": "^1.0.0",
|
|
58
|
-
"posthtml-fetch": "^2.0.0",
|
|
59
|
-
"posthtml-markdownit": "^1.3.0",
|
|
60
|
-
"posthtml-modules": "^0.8.
|
|
61
|
-
"posthtml-mso": "^1.0.4",
|
|
62
|
-
"posthtml-postcss-merge-longhand": "^1.0.2",
|
|
63
|
-
"posthtml-remove-attributes": "^1.0.0",
|
|
64
|
-
"posthtml-safe-class-names": "^1.0.4",
|
|
65
|
-
"posthtml-url-parameters": "^1.0.4",
|
|
66
|
-
"pretty": "^2.0.0",
|
|
67
|
-
"prevent-widows": "^1.0.2",
|
|
68
|
-
"query-string": "^7.1.0",
|
|
69
|
-
"string-strip-html": "^8.2.0",
|
|
70
|
-
"tailwindcss": "^3.0.0"
|
|
71
|
-
},
|
|
72
|
-
"devDependencies": {
|
|
73
|
-
"ava": "^4.0.1",
|
|
74
|
-
"c8": "^7.11.0",
|
|
75
|
-
"np": "*",
|
|
76
|
-
"xo": "0.39.1"
|
|
77
|
-
},
|
|
78
|
-
"engines": {
|
|
79
|
-
"node": ">=12.13.0"
|
|
80
|
-
},
|
|
81
|
-
"ava": {
|
|
82
|
-
"files": [
|
|
83
|
-
"test/**/test*.js"
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@maizzle/framework",
|
|
3
|
+
"version": "4.0.0-alpha.7",
|
|
4
|
+
"description": "Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "src/index.js",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/maizzle/framework.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": "https://github.com/maizzle/framework/issues",
|
|
12
|
+
"homepage": "https://maizzle.com",
|
|
13
|
+
"author": "Cosmin Popovici (https://github.com/cossssmin)",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"maizzle",
|
|
16
|
+
"tailwindcss",
|
|
17
|
+
"responsive-email",
|
|
18
|
+
"email-framework",
|
|
19
|
+
"email-template",
|
|
20
|
+
"email-marketing",
|
|
21
|
+
"email-campaigns",
|
|
22
|
+
"email-newsletter",
|
|
23
|
+
"email-boilerplate",
|
|
24
|
+
"html-emails"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"test": "c8 ava -s",
|
|
31
|
+
"pretest": "xo",
|
|
32
|
+
"style": "xo",
|
|
33
|
+
"release": "np"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"autoprefixer": "^10.4.0",
|
|
37
|
+
"browser-sync": "^2.26.13",
|
|
38
|
+
"color-shorthand-hex-to-six-digit": "^3.0.2",
|
|
39
|
+
"email-comb": "^5.0.0",
|
|
40
|
+
"front-matter": "^4.0.0",
|
|
41
|
+
"fs-extra": "^10.0.0",
|
|
42
|
+
"glob-promise": "^4.1.0",
|
|
43
|
+
"html-crush": "^4.0.0",
|
|
44
|
+
"is-url-superb": "^5.0.0",
|
|
45
|
+
"juice": "^8.0.0",
|
|
46
|
+
"lodash": "^4.17.20",
|
|
47
|
+
"ora": "^5.1.0",
|
|
48
|
+
"postcss": "^8.4.4",
|
|
49
|
+
"postcss-import": "^14.0.0",
|
|
50
|
+
"postcss-merge-longhand": "^5.0.1",
|
|
51
|
+
"posthtml": "^0.16.6",
|
|
52
|
+
"posthtml-attrs-parser": "^0.1.1",
|
|
53
|
+
"posthtml-base-url": "^1.0.1",
|
|
54
|
+
"posthtml-content": "^0.0.3",
|
|
55
|
+
"posthtml-expressions": "^1.8.1",
|
|
56
|
+
"posthtml-extend": "^0.6.0",
|
|
57
|
+
"posthtml-extra-attributes": "^1.0.0",
|
|
58
|
+
"posthtml-fetch": "^2.0.0",
|
|
59
|
+
"posthtml-markdownit": "^1.3.0",
|
|
60
|
+
"posthtml-modules": "^0.8.1",
|
|
61
|
+
"posthtml-mso": "^1.0.4",
|
|
62
|
+
"posthtml-postcss-merge-longhand": "^1.0.2",
|
|
63
|
+
"posthtml-remove-attributes": "^1.0.0",
|
|
64
|
+
"posthtml-safe-class-names": "^1.0.4",
|
|
65
|
+
"posthtml-url-parameters": "^1.0.4",
|
|
66
|
+
"pretty": "^2.0.0",
|
|
67
|
+
"prevent-widows": "^1.0.2",
|
|
68
|
+
"query-string": "^7.1.0",
|
|
69
|
+
"string-strip-html": "^8.2.0",
|
|
70
|
+
"tailwindcss": "^3.0.0"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"ava": "^4.0.1",
|
|
74
|
+
"c8": "^7.11.0",
|
|
75
|
+
"np": "*",
|
|
76
|
+
"xo": "0.39.1"
|
|
77
|
+
},
|
|
78
|
+
"engines": {
|
|
79
|
+
"node": ">=12.13.0"
|
|
80
|
+
},
|
|
81
|
+
"ava": {
|
|
82
|
+
"files": [
|
|
83
|
+
"test/**/test*.js"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
}
|
package/src/commands/serve.js
CHANGED
|
@@ -72,19 +72,23 @@ const serve = async (env = 'local', config = {}) => {
|
|
|
72
72
|
renderOptions
|
|
73
73
|
)
|
|
74
74
|
.then(async ({html, config}) => {
|
|
75
|
+
let source = ''
|
|
75
76
|
let dest = ''
|
|
76
77
|
let ext = ''
|
|
77
78
|
|
|
78
79
|
if (Array.isArray(config.build.templates)) {
|
|
79
80
|
const match = config.build.templates.find(template => template.source === path.parse(file).dir)
|
|
81
|
+
source = get(match, 'source')
|
|
80
82
|
dest = get(match, 'destination.path', 'build_local')
|
|
81
83
|
ext = get(match, 'destination.ext', 'html')
|
|
82
84
|
} else if (isObject(config.build.templates)) {
|
|
85
|
+
source = get(config, 'build.templates.source')
|
|
83
86
|
dest = get(config, 'build.templates.destination.path', 'build_local')
|
|
84
87
|
ext = get(config, 'build.templates.destination.ext', 'html')
|
|
85
88
|
}
|
|
86
89
|
|
|
87
|
-
const
|
|
90
|
+
const fileDir = path.parse(file).dir.replace(source, '')
|
|
91
|
+
const finalDestination = path.join(dest, fileDir, `${path.parse(file).name}.${ext}`)
|
|
88
92
|
|
|
89
93
|
await fs.outputFile(config.permalink || finalDestination, html)
|
|
90
94
|
})
|