@maizzle/framework 4.0.0 → 4.0.1
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/.editorconfig +9 -9
- package/.github/workflows/nodejs.yml +28 -28
- package/LICENSE +21 -21
- package/bin/maizzle +3 -3
- package/package.json +2 -2
- package/src/generators/config.js +32 -32
- package/src/generators/output/index.js +4 -4
- package/src/generators/output/to-disk.js +208 -208
- package/src/generators/output/to-string.js +67 -67
- package/src/generators/postcss.js +29 -29
- package/src/generators/posthtml.js +66 -66
- package/src/index.js +17 -17
- package/src/transformers/attributeToStyle.js +90 -90
- package/src/transformers/baseUrl.js +69 -69
- package/src/transformers/extraAttributes.js +26 -26
- package/src/transformers/filters/defaultFilters.js +126 -126
- package/src/transformers/filters/index.js +55 -55
- package/src/transformers/inlineCss.js +37 -37
- package/src/transformers/markdown.js +19 -19
- package/src/transformers/minify.js +21 -21
- package/src/transformers/plaintext.js +23 -23
- package/src/transformers/posthtmlMso.js +10 -10
- package/src/transformers/prettify.js +27 -27
- package/src/transformers/preventWidows.js +13 -13
- package/src/transformers/removeAttributes.js +17 -17
- package/src/transformers/removeInlineBackgroundColor.js +52 -52
- package/src/transformers/removeInlineSizes.js +41 -41
- package/src/transformers/replaceStrings.js +14 -14
- package/src/transformers/safeClassNames.js +24 -24
- package/src/transformers/shorthandInlineCSS.js +19 -19
- package/src/transformers/sixHex.js +33 -33
- package/src/transformers/urlParameters.js +17 -17
- package/src/utils/helpers.js +17 -17
- package/test/expected/posthtml/extend-template.html +2 -2
- package/test/expected/posthtml/fetch.html +5 -5
- package/test/expected/posthtml/layout.html +3 -3
- package/test/expected/transformers/base-url.html +99 -99
- package/test/fixtures/posthtml/extend-template.html +7 -7
- package/test/fixtures/posthtml/fetch.html +9 -9
- package/test/fixtures/posthtml/layout.html +11 -11
- package/test/fixtures/transformers/base-url.html +101 -101
- package/test/stubs/assets/foo.bar +1 -1
- package/test/stubs/breaking/bad.html +5 -5
- package/test/stubs/config/config.js +10 -10
- package/test/stubs/config/config.maizzle-ci.js +10 -10
- package/test/stubs/data.json +14 -14
- package/test/stubs/events/before-create.html +1 -1
- package/test/stubs/layouts/basic.html +1 -1
- package/test/stubs/layouts/full.html +12 -12
- package/test/stubs/layouts/template.html +5 -5
- package/test/stubs/main.css +5 -5
- package/test/stubs/tailwind/content-source.html +1 -1
- package/test/stubs/tailwind/tailwind.css +3 -3
- package/test/stubs/template.html +10 -10
- package/test/test-posthtml.js +72 -72
- package/test/test-todisk.js +511 -511
- package/test/test-transformers.js +1 -0
- package/xo.config.js +22 -22
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
const posthtml = require('posthtml')
|
|
2
|
-
const {get, isEmpty} = require('lodash')
|
|
3
|
-
const urlParams = require('posthtml-url-parameters')
|
|
4
|
-
|
|
5
|
-
module.exports = async (html, config = {}, direct = false) => {
|
|
6
|
-
const urlParameters = direct ? config : get(config, 'urlParameters', {})
|
|
7
|
-
|
|
8
|
-
if (!isEmpty(urlParameters)) {
|
|
9
|
-
const {_options, ...parameters} = urlParameters
|
|
10
|
-
const {tags, qs} = _options || {tags: ['a'], qs: {encode: false}}
|
|
11
|
-
const posthtmlOptions = get(config, 'build.posthtml.options', {})
|
|
12
|
-
|
|
13
|
-
return posthtml([urlParams({parameters, tags, qs})]).process(html, posthtmlOptions).then(result => result.html)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return html
|
|
17
|
-
}
|
|
1
|
+
const posthtml = require('posthtml')
|
|
2
|
+
const {get, isEmpty} = require('lodash')
|
|
3
|
+
const urlParams = require('posthtml-url-parameters')
|
|
4
|
+
|
|
5
|
+
module.exports = async (html, config = {}, direct = false) => {
|
|
6
|
+
const urlParameters = direct ? config : get(config, 'urlParameters', {})
|
|
7
|
+
|
|
8
|
+
if (!isEmpty(urlParameters)) {
|
|
9
|
+
const {_options, ...parameters} = urlParameters
|
|
10
|
+
const {tags, qs} = _options || {tags: ['a'], qs: {encode: false}}
|
|
11
|
+
const posthtmlOptions = get(config, 'build.posthtml.options', {})
|
|
12
|
+
|
|
13
|
+
return posthtml([urlParams({parameters, tags, qs})]).process(html, posthtmlOptions).then(result => result.html)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return html
|
|
17
|
+
}
|
package/src/utils/helpers.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
asyncForEach: async (array, callback) => {
|
|
3
|
-
for (let index = 0; index < array.length; index++) {
|
|
4
|
-
await callback(array[index], index, array) // eslint-disable-line
|
|
5
|
-
}
|
|
6
|
-
},
|
|
7
|
-
requireUncached: module => {
|
|
8
|
-
try {
|
|
9
|
-
delete require.cache[require.resolve(module)]
|
|
10
|
-
return require(module)
|
|
11
|
-
} catch {
|
|
12
|
-
throw new Error(`could not load ${module}`)
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
// https://github.com/lukeed/console-clear
|
|
16
|
-
clearConsole: () => process.stdout.write('\x1B[H\x1B[2J')
|
|
17
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
asyncForEach: async (array, callback) => {
|
|
3
|
+
for (let index = 0; index < array.length; index++) {
|
|
4
|
+
await callback(array[index], index, array) // eslint-disable-line
|
|
5
|
+
}
|
|
6
|
+
},
|
|
7
|
+
requireUncached: module => {
|
|
8
|
+
try {
|
|
9
|
+
delete require.cache[require.resolve(module)]
|
|
10
|
+
return require(module)
|
|
11
|
+
} catch {
|
|
12
|
+
throw new Error(`could not load ${module}`)
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
// https://github.com/lukeed/console-clear
|
|
16
|
+
clearConsole: () => process.stdout.write('\x1B[H\x1B[2J')
|
|
17
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Parent
|
|
2
|
-
Child in second.html
|
|
1
|
+
Parent
|
|
2
|
+
Child in second.html
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Leanne Graham
|
|
2
|
-
|
|
3
|
-
Ervin Howell
|
|
4
|
-
|
|
5
|
-
Clementine Bauch
|
|
1
|
+
Leanne Graham
|
|
2
|
+
|
|
3
|
+
Ervin Howell
|
|
4
|
+
|
|
5
|
+
Clementine Bauch
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
Environment: maizzle-ci
|
|
2
|
-
|
|
3
|
-
Front matter variable: Hello
|
|
1
|
+
Environment: maizzle-ci
|
|
2
|
+
|
|
3
|
+
Front matter variable: Hello
|
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<style>.test {
|
|
4
|
-
background-image: url('https://example.com/image.jpg');
|
|
5
|
-
background: url('https://example.com/image.jpg');
|
|
6
|
-
background-image: url('https://preserve.me/image.jpg');
|
|
7
|
-
background: url('https://preserve.me/image.jpg');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.test-2 {
|
|
11
|
-
background-image: url("https://example.com/image.jpg");
|
|
12
|
-
background: url("https://example.com/image.jpg");
|
|
13
|
-
background-image: url("https://preserve.me/image.jpg");
|
|
14
|
-
background: url("https://preserve.me/image.jpg");
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.test-3 {
|
|
18
|
-
background-image: url(https://example.com/image.jpg);
|
|
19
|
-
background: url(https://example.com/image.jpg);
|
|
20
|
-
background-image: url(https://preserve.me/image.jpg);
|
|
21
|
-
background: url(https://preserve.me/image.jpg);
|
|
22
|
-
}</style>
|
|
23
|
-
</head>
|
|
24
|
-
|
|
25
|
-
<body>
|
|
26
|
-
<img src="https://example.com/test.jpg">
|
|
27
|
-
<img src="https://example.com/test.jpg">
|
|
28
|
-
|
|
29
|
-
<img src="https://example.com/image1.jpg" srcset="https://example.com/image1-HD.jpg 2x, https://example.com/image1-phone.jpg 100w">
|
|
30
|
-
|
|
31
|
-
<img src="https://example.com/image2.jpg" srcset="https://example.com/image2-HD.jpg 2x, https://example.com/image2-phone.jpg 100w">
|
|
32
|
-
|
|
33
|
-
<picture>
|
|
34
|
-
<source media="(max-width: 799px)" srcset="https://example.com/elva-480w-close-portrait.jpg">
|
|
35
|
-
<source media="(min-width: 800px)" srcset="https://example.com/elva-800w.jpg">
|
|
36
|
-
<img src="https://example.com/elva-800w.jpg" alt="...">
|
|
37
|
-
</picture>
|
|
38
|
-
|
|
39
|
-
<video width="250" poster="https://example.com/flower.jpg">
|
|
40
|
-
<source src="https://example.com/media/flower.webm" type="video/webm">
|
|
41
|
-
<source src="https://example.tv/media/flower.mp4" type="video/mp4">
|
|
42
|
-
<track default="" kind="captions" srclang="en" src="https://example.com/media/tracks/friday.vtt">
|
|
43
|
-
</video>
|
|
44
|
-
|
|
45
|
-
<audio src="https://example.com/media/sample.mp3">
|
|
46
|
-
Fallback content
|
|
47
|
-
</audio>
|
|
48
|
-
|
|
49
|
-
<embed type="video/webm" src="https://example.com/media/flower.mp4" width="250" height="200">
|
|
50
|
-
|
|
51
|
-
<iframe width="300" height="200" src="https://example.com/embed.html"></iframe>
|
|
52
|
-
|
|
53
|
-
<input type="image" src="https://example.com/image.jpg" alt="">
|
|
54
|
-
|
|
55
|
-
<script src="https://example.com/javascript.js"></script>
|
|
56
|
-
|
|
57
|
-
<div>
|
|
58
|
-
<!--[if mso]>
|
|
59
|
-
<v:image xmlns:v="urn:schemas-microsoft-com:vml" src="https://example.com/image.jpg" style="width:600px;height:400px;" />
|
|
60
|
-
<v:rect fill="false" stroke="false" style="position:absolute;width:600px;height:400px;">
|
|
61
|
-
<v:textbox inset="0,0,0,0"><div><![endif]-->
|
|
62
|
-
<div>test</div>
|
|
63
|
-
<!--[if mso]></div></v:textbox></v:rect><![endif]-->
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
<!--[if mso]>
|
|
67
|
-
<v:image src="https://example.com/image-2.jpg" xmlns:v="urn:schemas-microsoft-com:vml" style="width:600px;height:400px;" />
|
|
68
|
-
<![endif]-->
|
|
69
|
-
|
|
70
|
-
<!--[if mso]>
|
|
71
|
-
<v:image xmlns:v="urn:schemas-microsoft-com:vml" src="https://example.com/image-3.jpg" style="width:600px;height:400px;" />
|
|
72
|
-
<![endif]-->
|
|
73
|
-
|
|
74
|
-
<table>
|
|
75
|
-
<tr>
|
|
76
|
-
<td background="https://example.com/image.png" bgcolor="#7bceeb" width="120" height="92" valign="top">
|
|
77
|
-
<!--[if gte mso 9]>
|
|
78
|
-
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:120px;height:92px;">
|
|
79
|
-
<v:fill type="tile" src="https://example.com/image.png" color="#7bceeb" />
|
|
80
|
-
<v:textbox inset="0,0,0,0">
|
|
81
|
-
<![endif]-->
|
|
82
|
-
<div>test</div>
|
|
83
|
-
<!--[if gte mso 9]>
|
|
84
|
-
</v:textbox>
|
|
85
|
-
</v:rect>
|
|
86
|
-
<![endif]-->
|
|
87
|
-
</td>
|
|
88
|
-
</tr>
|
|
89
|
-
</table>
|
|
90
|
-
|
|
91
|
-
<!--[if mso]>
|
|
92
|
-
<v:fill type="tile" src="https://example.com/image.png" color="#7bceeb" />
|
|
93
|
-
<![endif]-->
|
|
94
|
-
|
|
95
|
-
<!--[if mso]>
|
|
96
|
-
<v:fill type="tile" src="https://example.com/image.png" color="#7bceeb" />
|
|
97
|
-
<![endif]-->
|
|
98
|
-
</body>
|
|
99
|
-
</html>
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<style>.test {
|
|
4
|
+
background-image: url('https://example.com/image.jpg');
|
|
5
|
+
background: url('https://example.com/image.jpg');
|
|
6
|
+
background-image: url('https://preserve.me/image.jpg');
|
|
7
|
+
background: url('https://preserve.me/image.jpg');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.test-2 {
|
|
11
|
+
background-image: url("https://example.com/image.jpg");
|
|
12
|
+
background: url("https://example.com/image.jpg");
|
|
13
|
+
background-image: url("https://preserve.me/image.jpg");
|
|
14
|
+
background: url("https://preserve.me/image.jpg");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.test-3 {
|
|
18
|
+
background-image: url(https://example.com/image.jpg);
|
|
19
|
+
background: url(https://example.com/image.jpg);
|
|
20
|
+
background-image: url(https://preserve.me/image.jpg);
|
|
21
|
+
background: url(https://preserve.me/image.jpg);
|
|
22
|
+
}</style>
|
|
23
|
+
</head>
|
|
24
|
+
|
|
25
|
+
<body>
|
|
26
|
+
<img src="https://example.com/test.jpg">
|
|
27
|
+
<img src="https://example.com/test.jpg">
|
|
28
|
+
|
|
29
|
+
<img src="https://example.com/image1.jpg" srcset="https://example.com/image1-HD.jpg 2x, https://example.com/image1-phone.jpg 100w">
|
|
30
|
+
|
|
31
|
+
<img src="https://example.com/image2.jpg" srcset="https://example.com/image2-HD.jpg 2x, https://example.com/image2-phone.jpg 100w">
|
|
32
|
+
|
|
33
|
+
<picture>
|
|
34
|
+
<source media="(max-width: 799px)" srcset="https://example.com/elva-480w-close-portrait.jpg">
|
|
35
|
+
<source media="(min-width: 800px)" srcset="https://example.com/elva-800w.jpg">
|
|
36
|
+
<img src="https://example.com/elva-800w.jpg" alt="...">
|
|
37
|
+
</picture>
|
|
38
|
+
|
|
39
|
+
<video width="250" poster="https://example.com/flower.jpg">
|
|
40
|
+
<source src="https://example.com/media/flower.webm" type="video/webm">
|
|
41
|
+
<source src="https://example.tv/media/flower.mp4" type="video/mp4">
|
|
42
|
+
<track default="" kind="captions" srclang="en" src="https://example.com/media/tracks/friday.vtt">
|
|
43
|
+
</video>
|
|
44
|
+
|
|
45
|
+
<audio src="https://example.com/media/sample.mp3">
|
|
46
|
+
Fallback content
|
|
47
|
+
</audio>
|
|
48
|
+
|
|
49
|
+
<embed type="video/webm" src="https://example.com/media/flower.mp4" width="250" height="200">
|
|
50
|
+
|
|
51
|
+
<iframe width="300" height="200" src="https://example.com/embed.html"></iframe>
|
|
52
|
+
|
|
53
|
+
<input type="image" src="https://example.com/image.jpg" alt="">
|
|
54
|
+
|
|
55
|
+
<script src="https://example.com/javascript.js"></script>
|
|
56
|
+
|
|
57
|
+
<div>
|
|
58
|
+
<!--[if mso]>
|
|
59
|
+
<v:image xmlns:v="urn:schemas-microsoft-com:vml" src="https://example.com/image.jpg" style="width:600px;height:400px;" />
|
|
60
|
+
<v:rect fill="false" stroke="false" style="position:absolute;width:600px;height:400px;">
|
|
61
|
+
<v:textbox inset="0,0,0,0"><div><![endif]-->
|
|
62
|
+
<div>test</div>
|
|
63
|
+
<!--[if mso]></div></v:textbox></v:rect><![endif]-->
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<!--[if mso]>
|
|
67
|
+
<v:image src="https://example.com/image-2.jpg" xmlns:v="urn:schemas-microsoft-com:vml" style="width:600px;height:400px;" />
|
|
68
|
+
<![endif]-->
|
|
69
|
+
|
|
70
|
+
<!--[if mso]>
|
|
71
|
+
<v:image xmlns:v="urn:schemas-microsoft-com:vml" src="https://example.com/image-3.jpg" style="width:600px;height:400px;" />
|
|
72
|
+
<![endif]-->
|
|
73
|
+
|
|
74
|
+
<table>
|
|
75
|
+
<tr>
|
|
76
|
+
<td background="https://example.com/image.png" bgcolor="#7bceeb" width="120" height="92" valign="top">
|
|
77
|
+
<!--[if gte mso 9]>
|
|
78
|
+
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:120px;height:92px;">
|
|
79
|
+
<v:fill type="tile" src="https://example.com/image.png" color="#7bceeb" />
|
|
80
|
+
<v:textbox inset="0,0,0,0">
|
|
81
|
+
<![endif]-->
|
|
82
|
+
<div>test</div>
|
|
83
|
+
<!--[if gte mso 9]>
|
|
84
|
+
</v:textbox>
|
|
85
|
+
</v:rect>
|
|
86
|
+
<![endif]-->
|
|
87
|
+
</td>
|
|
88
|
+
</tr>
|
|
89
|
+
</table>
|
|
90
|
+
|
|
91
|
+
<!--[if mso]>
|
|
92
|
+
<v:fill type="tile" src="https://example.com/image.png" color="#7bceeb" />
|
|
93
|
+
<![endif]-->
|
|
94
|
+
|
|
95
|
+
<!--[if mso]>
|
|
96
|
+
<v:fill type="tile" src="https://example.com/image.png" color="#7bceeb" />
|
|
97
|
+
<![endif]-->
|
|
98
|
+
</body>
|
|
99
|
+
</html>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
---
|
|
2
|
-
template: second
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
<extends src="test/stubs/template.html">
|
|
6
|
-
<block name="button">Child in second.html</block>
|
|
7
|
-
</extends>
|
|
1
|
+
---
|
|
2
|
+
template: second
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<extends src="test/stubs/template.html">
|
|
6
|
+
<block name="button">Child in second.html</block>
|
|
7
|
+
</extends>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<extends src="test/stubs/layouts/basic.html">
|
|
2
|
-
<block name="template">
|
|
3
|
-
<fetch url="test/stubs/data.json">
|
|
4
|
-
<each loop="user in response">
|
|
5
|
-
[[ user.name ]]
|
|
6
|
-
</each>
|
|
7
|
-
</fetch>
|
|
8
|
-
</block>
|
|
9
|
-
</extends>
|
|
1
|
+
<extends src="test/stubs/layouts/basic.html">
|
|
2
|
+
<block name="template">
|
|
3
|
+
<fetch url="test/stubs/data.json">
|
|
4
|
+
<each loop="user in response">
|
|
5
|
+
[[ user.name ]]
|
|
6
|
+
</each>
|
|
7
|
+
</fetch>
|
|
8
|
+
</block>
|
|
9
|
+
</extends>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
---
|
|
2
|
-
greeting: Hello
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
<extends src="test/stubs/layouts/basic.html">
|
|
6
|
-
<block name="template">
|
|
7
|
-
Environment: {{ page.env }}
|
|
8
|
-
|
|
9
|
-
Front matter variable: {{ page.greeting }}
|
|
10
|
-
</block>
|
|
11
|
-
</extends>
|
|
1
|
+
---
|
|
2
|
+
greeting: Hello
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<extends src="test/stubs/layouts/basic.html">
|
|
6
|
+
<block name="template">
|
|
7
|
+
Environment: {{ page.env }}
|
|
8
|
+
|
|
9
|
+
Front matter variable: {{ page.greeting }}
|
|
10
|
+
</block>
|
|
11
|
+
</extends>
|
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<style>
|
|
4
|
-
.test {
|
|
5
|
-
background-image: url('image.jpg');
|
|
6
|
-
background: url('image.jpg');
|
|
7
|
-
background-image: url('https://preserve.me/image.jpg');
|
|
8
|
-
background: url('https://preserve.me/image.jpg');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.test-2 {
|
|
12
|
-
background-image: url("image.jpg");
|
|
13
|
-
background: url("image.jpg");
|
|
14
|
-
background-image: url("https://preserve.me/image.jpg");
|
|
15
|
-
background: url("https://preserve.me/image.jpg");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.test-3 {
|
|
19
|
-
background-image: url(image.jpg);
|
|
20
|
-
background: url(image.jpg);
|
|
21
|
-
background-image: url(https://preserve.me/image.jpg);
|
|
22
|
-
background: url(https://preserve.me/image.jpg);
|
|
23
|
-
}
|
|
24
|
-
</style>
|
|
25
|
-
</head>
|
|
26
|
-
|
|
27
|
-
<body>
|
|
28
|
-
<img src="test.jpg">
|
|
29
|
-
<img src="https://example.com/test.jpg">
|
|
30
|
-
|
|
31
|
-
<img src="image1.jpg" srcset="image1-HD.jpg 2x,image1-phone.jpg 100w">
|
|
32
|
-
|
|
33
|
-
<img src="https://example.com/image2.jpg" srcset="https://example.com/image2-HD.jpg 2x, https://example.com/image2-phone.jpg 100w">
|
|
34
|
-
|
|
35
|
-
<picture>
|
|
36
|
-
<source media="(max-width: 799px)" srcset="elva-480w-close-portrait.jpg">
|
|
37
|
-
<source media="(min-width: 800px)" srcset="elva-800w.jpg">
|
|
38
|
-
<img src="elva-800w.jpg" alt="...">
|
|
39
|
-
</picture>
|
|
40
|
-
|
|
41
|
-
<video width="250" poster="flower.jpg">
|
|
42
|
-
<source src="media/flower.webm" type="video/webm">
|
|
43
|
-
<source src="https://example.tv/media/flower.mp4" type="video/mp4">
|
|
44
|
-
<track default kind="captions" srclang="en" src="media/tracks/friday.vtt">
|
|
45
|
-
</video>
|
|
46
|
-
|
|
47
|
-
<audio src="media/sample.mp3">
|
|
48
|
-
Fallback content
|
|
49
|
-
</audio>
|
|
50
|
-
|
|
51
|
-
<embed type="video/webm" src="media/flower.mp4" width="250" height="200">
|
|
52
|
-
|
|
53
|
-
<iframe width="300" height="200" src="embed.html"></iframe>
|
|
54
|
-
|
|
55
|
-
<input type="image" src="image.jpg" alt="">
|
|
56
|
-
|
|
57
|
-
<script src="javascript.js"></script>
|
|
58
|
-
|
|
59
|
-
<div>
|
|
60
|
-
<!--[if mso]>
|
|
61
|
-
<v:image xmlns:v="urn:schemas-microsoft-com:vml" src="image.jpg" style="width:600px;height:400px;" />
|
|
62
|
-
<v:rect fill="false" stroke="false" style="position:absolute;width:600px;height:400px;">
|
|
63
|
-
<v:textbox inset="0,0,0,0"><div><![endif]-->
|
|
64
|
-
<div>test</div>
|
|
65
|
-
<!--[if mso]></div></v:textbox></v:rect><![endif]-->
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
<!--[if mso]>
|
|
69
|
-
<v:image src="image-2.jpg" xmlns:v="urn:schemas-microsoft-com:vml" style="width:600px;height:400px;" />
|
|
70
|
-
<![endif]-->
|
|
71
|
-
|
|
72
|
-
<!--[if mso]>
|
|
73
|
-
<v:image xmlns:v="urn:schemas-microsoft-com:vml" src="https://example.com/image-3.jpg" style="width:600px;height:400px;" />
|
|
74
|
-
<![endif]-->
|
|
75
|
-
|
|
76
|
-
<table>
|
|
77
|
-
<tr>
|
|
78
|
-
<td background="image.png" bgcolor="#7bceeb" width="120" height="92" valign="top">
|
|
79
|
-
<!--[if gte mso 9]>
|
|
80
|
-
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:120px;height:92px;">
|
|
81
|
-
<v:fill type="tile" src="image.png" color="#7bceeb" />
|
|
82
|
-
<v:textbox inset="0,0,0,0">
|
|
83
|
-
<![endif]-->
|
|
84
|
-
<div>test</div>
|
|
85
|
-
<!--[if gte mso 9]>
|
|
86
|
-
</v:textbox>
|
|
87
|
-
</v:rect>
|
|
88
|
-
<![endif]-->
|
|
89
|
-
</td>
|
|
90
|
-
</tr>
|
|
91
|
-
</table>
|
|
92
|
-
|
|
93
|
-
<!--[if mso]>
|
|
94
|
-
<v:fill type="tile" src="image.png" color="#7bceeb" />
|
|
95
|
-
<![endif]-->
|
|
96
|
-
|
|
97
|
-
<!--[if mso]>
|
|
98
|
-
<v:fill type="tile" src="https://example.com/image.png" color="#7bceeb" />
|
|
99
|
-
<![endif]-->
|
|
100
|
-
</body>
|
|
101
|
-
</html>
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<style>
|
|
4
|
+
.test {
|
|
5
|
+
background-image: url('image.jpg');
|
|
6
|
+
background: url('image.jpg');
|
|
7
|
+
background-image: url('https://preserve.me/image.jpg');
|
|
8
|
+
background: url('https://preserve.me/image.jpg');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.test-2 {
|
|
12
|
+
background-image: url("image.jpg");
|
|
13
|
+
background: url("image.jpg");
|
|
14
|
+
background-image: url("https://preserve.me/image.jpg");
|
|
15
|
+
background: url("https://preserve.me/image.jpg");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.test-3 {
|
|
19
|
+
background-image: url(image.jpg);
|
|
20
|
+
background: url(image.jpg);
|
|
21
|
+
background-image: url(https://preserve.me/image.jpg);
|
|
22
|
+
background: url(https://preserve.me/image.jpg);
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
25
|
+
</head>
|
|
26
|
+
|
|
27
|
+
<body>
|
|
28
|
+
<img src="test.jpg">
|
|
29
|
+
<img src="https://example.com/test.jpg">
|
|
30
|
+
|
|
31
|
+
<img src="image1.jpg" srcset="image1-HD.jpg 2x,image1-phone.jpg 100w">
|
|
32
|
+
|
|
33
|
+
<img src="https://example.com/image2.jpg" srcset="https://example.com/image2-HD.jpg 2x, https://example.com/image2-phone.jpg 100w">
|
|
34
|
+
|
|
35
|
+
<picture>
|
|
36
|
+
<source media="(max-width: 799px)" srcset="elva-480w-close-portrait.jpg">
|
|
37
|
+
<source media="(min-width: 800px)" srcset="elva-800w.jpg">
|
|
38
|
+
<img src="elva-800w.jpg" alt="...">
|
|
39
|
+
</picture>
|
|
40
|
+
|
|
41
|
+
<video width="250" poster="flower.jpg">
|
|
42
|
+
<source src="media/flower.webm" type="video/webm">
|
|
43
|
+
<source src="https://example.tv/media/flower.mp4" type="video/mp4">
|
|
44
|
+
<track default kind="captions" srclang="en" src="media/tracks/friday.vtt">
|
|
45
|
+
</video>
|
|
46
|
+
|
|
47
|
+
<audio src="media/sample.mp3">
|
|
48
|
+
Fallback content
|
|
49
|
+
</audio>
|
|
50
|
+
|
|
51
|
+
<embed type="video/webm" src="media/flower.mp4" width="250" height="200">
|
|
52
|
+
|
|
53
|
+
<iframe width="300" height="200" src="embed.html"></iframe>
|
|
54
|
+
|
|
55
|
+
<input type="image" src="image.jpg" alt="">
|
|
56
|
+
|
|
57
|
+
<script src="javascript.js"></script>
|
|
58
|
+
|
|
59
|
+
<div>
|
|
60
|
+
<!--[if mso]>
|
|
61
|
+
<v:image xmlns:v="urn:schemas-microsoft-com:vml" src="image.jpg" style="width:600px;height:400px;" />
|
|
62
|
+
<v:rect fill="false" stroke="false" style="position:absolute;width:600px;height:400px;">
|
|
63
|
+
<v:textbox inset="0,0,0,0"><div><![endif]-->
|
|
64
|
+
<div>test</div>
|
|
65
|
+
<!--[if mso]></div></v:textbox></v:rect><![endif]-->
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<!--[if mso]>
|
|
69
|
+
<v:image src="image-2.jpg" xmlns:v="urn:schemas-microsoft-com:vml" style="width:600px;height:400px;" />
|
|
70
|
+
<![endif]-->
|
|
71
|
+
|
|
72
|
+
<!--[if mso]>
|
|
73
|
+
<v:image xmlns:v="urn:schemas-microsoft-com:vml" src="https://example.com/image-3.jpg" style="width:600px;height:400px;" />
|
|
74
|
+
<![endif]-->
|
|
75
|
+
|
|
76
|
+
<table>
|
|
77
|
+
<tr>
|
|
78
|
+
<td background="image.png" bgcolor="#7bceeb" width="120" height="92" valign="top">
|
|
79
|
+
<!--[if gte mso 9]>
|
|
80
|
+
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:120px;height:92px;">
|
|
81
|
+
<v:fill type="tile" src="image.png" color="#7bceeb" />
|
|
82
|
+
<v:textbox inset="0,0,0,0">
|
|
83
|
+
<![endif]-->
|
|
84
|
+
<div>test</div>
|
|
85
|
+
<!--[if gte mso 9]>
|
|
86
|
+
</v:textbox>
|
|
87
|
+
</v:rect>
|
|
88
|
+
<![endif]-->
|
|
89
|
+
</td>
|
|
90
|
+
</tr>
|
|
91
|
+
</table>
|
|
92
|
+
|
|
93
|
+
<!--[if mso]>
|
|
94
|
+
<v:fill type="tile" src="image.png" color="#7bceeb" />
|
|
95
|
+
<![endif]-->
|
|
96
|
+
|
|
97
|
+
<!--[if mso]>
|
|
98
|
+
<v:fill type="tile" src="https://example.com/image.png" color="#7bceeb" />
|
|
99
|
+
<![endif]-->
|
|
100
|
+
</body>
|
|
101
|
+
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Some asset file...
|
|
1
|
+
Some asset file...
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: [THIS] should break
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
<div>{{ page.title }}</div>
|
|
1
|
+
---
|
|
2
|
+
title: [THIS] should break
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<div>{{ page.title }}</div>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
build: {
|
|
3
|
-
templates: {
|
|
4
|
-
source: '../templates',
|
|
5
|
-
destination: {
|
|
6
|
-
path: 'build_local'
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
build: {
|
|
3
|
+
templates: {
|
|
4
|
+
source: '../templates',
|
|
5
|
+
destination: {
|
|
6
|
+
path: 'build_local'
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
build: {
|
|
3
|
-
templates: {
|
|
4
|
-
source: '../templates',
|
|
5
|
-
destination: {
|
|
6
|
-
path: 'build_production'
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
build: {
|
|
3
|
+
templates: {
|
|
4
|
+
source: '../templates',
|
|
5
|
+
destination: {
|
|
6
|
+
path: 'build_production'
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
package/test/stubs/data.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"id": 1,
|
|
4
|
-
"name": "Leanne Graham"
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
"id": 2,
|
|
8
|
-
"name": "Ervin Howell"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"id": 3,
|
|
12
|
-
"name": "Clementine Bauch"
|
|
13
|
-
}
|
|
14
|
-
]
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": 1,
|
|
4
|
+
"name": "Leanne Graham"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"id": 2,
|
|
8
|
+
"name": "Ervin Howell"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": 3,
|
|
12
|
+
"name": "Clementine Bauch"
|
|
13
|
+
}
|
|
14
|
+
]
|