@maizzle/framework 4.2.4 → 4.3.0

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.
Files changed (53) hide show
  1. package/README.md +5 -5
  2. package/package.json +8 -4
  3. package/src/generators/tailwindcss.js +1 -1
  4. package/src/transformers/filters/index.js +4 -0
  5. package/src/transformers/index.js +1 -1
  6. package/src/transformers/inlineCss.js +8 -3
  7. package/src/transformers/removeInlineSizes.js +2 -3
  8. package/src/transformers/removeUnusedCss.js +6 -2
  9. package/.editorconfig +0 -9
  10. package/.github/CONTRIBUTING.md +0 -33
  11. package/.github/ISSUE_TEMPLATE.md +0 -2
  12. package/.github/PULL_REQUEST_TEMPLATE.md +0 -9
  13. package/.github/dependabot.yml +0 -11
  14. package/.github/media/logo-dark.svg +0 -1
  15. package/.github/media/logo-light.svg +0 -1
  16. package/.github/workflows/nodejs.yml +0 -28
  17. package/test/expected/posthtml/component.html +0 -13
  18. package/test/expected/transformers/base-url.html +0 -99
  19. package/test/expected/transformers/filters.html +0 -81
  20. package/test/fixtures/basic.html +0 -9
  21. package/test/fixtures/posthtml/component.html +0 -19
  22. package/test/fixtures/transformers/base-url.html +0 -101
  23. package/test/fixtures/transformers/filters.html +0 -87
  24. package/test/stubs/assets/foo.bar +0 -1
  25. package/test/stubs/breaking/bad.html +0 -5
  26. package/test/stubs/components/component.html +0 -5
  27. package/test/stubs/config/config.js +0 -10
  28. package/test/stubs/config/config.maizzle-ci.js +0 -10
  29. package/test/stubs/data.json +0 -14
  30. package/test/stubs/empty/empty.html +0 -0
  31. package/test/stubs/events/before-create.html +0 -1
  32. package/test/stubs/layouts/basic.html +0 -1
  33. package/test/stubs/layouts/full.html +0 -12
  34. package/test/stubs/layouts/template.html +0 -5
  35. package/test/stubs/main.css +0 -5
  36. package/test/stubs/plaintext/front-matter.html +0 -9
  37. package/test/stubs/plaintext/plaintext.html +0 -5
  38. package/test/stubs/post.css +0 -6
  39. package/test/stubs/tailwind/content-source.html +0 -1
  40. package/test/stubs/tailwind/tailwind.css +0 -3
  41. package/test/stubs/template.html +0 -10
  42. package/test/stubs/templates/1.html +0 -1
  43. package/test/stubs/templates/2.html +0 -1
  44. package/test/stubs/templates/2.test +0 -1
  45. package/test/test-config.js +0 -19
  46. package/test/test-misc.js +0 -8
  47. package/test/test-postcss.js +0 -8
  48. package/test/test-posthtml.js +0 -112
  49. package/test/test-tailwindcss.js +0 -115
  50. package/test/test-todisk.js +0 -493
  51. package/test/test-tostring.js +0 -164
  52. package/test/test-transformers.js +0 -626
  53. package/xo.config.js +0 -22
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  <div align="center">
2
2
  <p>
3
- <a href="https://maizzle.com/#gh-light-mode-only" target="_blank">
4
- <img src="./.github/media/logo-light.svg" alt="Maizzle" width="300">
5
- </a>
6
- <a href="https://maizzle.com/#gh-dark-mode-only" target="_blank">
7
- <img src="./.github/media/logo-dark.svg" alt="Maizzle" width="300">
3
+ <a href="https://maizzle.com" target="_blank">
4
+ <picture>
5
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/maizzle/framework/HEAD/.github/media/logo-dark.svg">
6
+ <img alt="Maizzle" src="https://raw.githubusercontent.com/maizzle/framework/HEAD/.github/media/logo-light.svg" width="300" height="225" style="max-width: 100%;">
7
+ </picture>
8
8
  </a>
9
9
  </p>
10
10
  <p>Quickly build HTML emails with utility-first CSS</p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maizzle/framework",
3
- "version": "4.2.4",
3
+ "version": "4.3.0",
4
4
  "description": "Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.",
5
5
  "license": "MIT",
6
6
  "main": "src/index.js",
@@ -35,6 +35,10 @@
35
35
  "style": "xo",
36
36
  "release": "np"
37
37
  },
38
+ "files": [
39
+ "src/*",
40
+ "bin/*"
41
+ ],
38
42
  "dependencies": {
39
43
  "@maizzle/cli": "^1.5.1",
40
44
  "autoprefixer": "^10.4.0",
@@ -49,7 +53,7 @@
49
53
  "juice": "^8.0.0",
50
54
  "lodash": "^4.17.20",
51
55
  "ora": "^5.1.0",
52
- "postcss": "^8.4.4",
56
+ "postcss": "^8.4.18",
53
57
  "postcss-import": "^15.0.0",
54
58
  "postcss-merge-longhand": "^5.0.1",
55
59
  "posthtml": "^0.16.6",
@@ -65,13 +69,13 @@
65
69
  "posthtml-modules": "^0.9.0",
66
70
  "posthtml-mso": "^1.0.4",
67
71
  "posthtml-postcss-merge-longhand": "^1.0.2",
68
- "posthtml-safe-class-names": "^1.0.8",
72
+ "posthtml-safe-class-names": "^2.0.0",
69
73
  "posthtml-url-parameters": "^1.0.4",
70
74
  "pretty": "^2.0.0",
71
75
  "query-string": "^7.1.0",
72
76
  "string-remove-widows": "^2.1.0",
73
77
  "string-strip-html": "^8.2.0",
74
- "tailwindcss": "^3.1.0"
78
+ "tailwindcss": "^3.2.0"
75
79
  },
76
80
  "devDependencies": {
77
81
  "ava": "^4.0.1",
@@ -113,7 +113,7 @@ module.exports = {
113
113
  }
114
114
 
115
115
  return postcss([...toProcess])
116
- .process(css, {from: undefined})
116
+ .process(css, {from: userFileExists ? userFilePath : undefined})
117
117
  .then(result => result.css)
118
118
  .catch(error => {
119
119
  throw new SyntaxError(error)
@@ -8,6 +8,10 @@ const safeClassNames = require('posthtml-safe-class-names')
8
8
  const defaultConfig = require('../../generators/posthtml/defaultConfig')
9
9
 
10
10
  module.exports = async (html, config = {}, direct = false) => {
11
+ if (get(config, 'filters') === false) {
12
+ return html
13
+ }
14
+
11
15
  const filters = direct ?
12
16
  merge(defaultFilters, config) :
13
17
  merge(defaultFilters, get(config, 'filters', {}))
@@ -54,7 +54,7 @@ exports.addURLParams = (html, config) => addURLParams(html, config, true)
54
54
  exports.preventWidows = (html, config) => preventWidows(html, config)
55
55
  exports.replaceStrings = (html, config) => replaceStrings(html, config, true)
56
56
  exports.safeClassNames = (html, config) => safeClassNames(html, config, true)
57
- exports.removeUnusedCSS = (html, config) => removeUnusedCSS(html, config)
57
+ exports.removeUnusedCSS = (html, config) => removeUnusedCSS(html, config, true)
58
58
  exports.removeAttributes = (html, config) => removeAttributes(html, config, true)
59
59
  exports.attributeToStyle = (html, config) => attributeToStyle(html, config, true)
60
60
  exports.removeInlineSizes = (html, config) => removeInlineSizes(html, config, true)
@@ -7,14 +7,17 @@ module.exports = async (html, config = {}, direct = false) => {
7
7
  }
8
8
 
9
9
  const options = direct ? config : get(config, 'inlineCSS', {})
10
+ // Default `removeStyleTags` to false so we can preserve
11
+ // CSS selectors that are not present in the HTML
10
12
  const removeStyleTags = get(options, 'removeStyleTags', false)
11
13
  const css = get(config, 'customCSS', false)
12
14
 
13
15
  if (get(config, 'inlineCSS') === true || !isEmpty(options)) {
16
+ options.applyAttributesTableElements = true
14
17
  juice.styleToAttribute = get(options, 'styleToAttribute', {'vertical-align': 'valign'})
15
18
 
16
- juice.widthElements = get(options, 'applyWidthAttributes', [])
17
- juice.heightElements = get(options, 'applyHeightAttributes', [])
19
+ juice.widthElements = get(options, 'applyWidthAttributes', []).map(i => i.toUpperCase())
20
+ juice.heightElements = get(options, 'applyHeightAttributes', []).map(i => i.toUpperCase())
18
21
 
19
22
  juice.excludedProperties = ['--tw-shadow']
20
23
 
@@ -28,7 +31,9 @@ module.exports = async (html, config = {}, direct = false) => {
28
31
  })
29
32
  }
30
33
 
31
- html = css ? juice.inlineContent(html, css, {removeStyleTags}) : juice(html, {removeStyleTags})
34
+ html = css ?
35
+ juice.inlineContent(html, css, {removeStyleTags, ...options}) :
36
+ juice(html, {removeStyleTags, ...options})
32
37
 
33
38
  return html
34
39
  }
@@ -19,12 +19,11 @@ module.exports = async (html, config = {}, direct = false) => {
19
19
  const removeInlineSizes = (mappings = {}) => tree => {
20
20
  const process = node => {
21
21
  const attrs = parseAttrs(node.attrs)
22
- const tag = node.tag ? node.tag.toUpperCase() : ''
23
22
 
24
23
  Object.entries(mappings).forEach(([attribute, tags]) => {
25
- tags = Object.values(tags)
24
+ tags = Object.values(tags).map(tag => tag.toLowerCase())
26
25
 
27
- if (!tags.includes(tag)) {
26
+ if (!tags.includes(node.tag)) {
28
27
  return node
29
28
  }
30
29
 
@@ -1,11 +1,15 @@
1
1
  const {comb} = require('email-comb')
2
2
  const {get, merge} = require('lodash')
3
3
 
4
- module.exports = async (html, config = {}) => {
4
+ module.exports = async (html, config = {}, direct = false) => {
5
5
  if (get(config, 'removeUnusedCSS') === false) {
6
6
  return html
7
7
  }
8
8
 
9
+ if (!direct && !get(config, 'removeUnusedCSS')) {
10
+ return html
11
+ }
12
+
9
13
  const safelist = [
10
14
  '*body*', // Gmail
11
15
  '.gmail*', // Gmail
@@ -13,7 +17,7 @@ module.exports = async (html, config = {}) => {
13
17
  '.ios*', // Mail on iOS
14
18
  '.ox-*', // Open-Xchange
15
19
  '.outlook*', // Outlook.com
16
- '.ogs*', // Outlook.com
20
+ '[data-ogs*', // Outlook.com
17
21
  '.bloop_container', // Airmail
18
22
  '.Singleton', // Apple Mail 10
19
23
  '.unused', // Notes 8
package/.editorconfig DELETED
@@ -1,9 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_style = space
5
- indent_size = 2
6
- end_of_line = lf
7
- charset = utf-8
8
- trim_trailing_whitespace = true
9
- insert_final_newline = true
@@ -1,33 +0,0 @@
1
- # Contributing
2
-
3
- Thank you for your interest in contributing to Maizzle!
4
-
5
- Please take a moment to review this document **before submitting a pull request**.
6
-
7
- ## Pull requests
8
-
9
- Please [ask first](https://github.com/maizzle/framework/issues) before starting work on any significant new features.
10
-
11
- ## Coding standards
12
-
13
- Our code formatting rules are defined in [xo.config.js](https://github.com/maizzle/framework/blob/master/xo.config.js). You can check your code against these standards by running:
14
-
15
- ```sh
16
- npm run style
17
- ```
18
-
19
- To automatically fix any style violations in your code, you can run:
20
-
21
- ```sh
22
- npm run style --fix
23
- ```
24
-
25
- ## Running tests
26
-
27
- You can run the test suite using the following command:
28
-
29
- ```sh
30
- npm test
31
- ```
32
-
33
- Please make sure that the tests are passing when submitting a pull request. If you're adding new features to Maizzle, please include tests.
@@ -1,2 +0,0 @@
1
- - Maizzle Version: #.#.#
2
- - Node.js Version: #.#.#
@@ -1,9 +0,0 @@
1
- <!--
2
-
3
- Thank you for your interest in contributing to Maizzle!
4
-
5
- **Please ask first before starting work on any significant new features.**
6
-
7
- https://github.com/maizzle/framework/blob/master/.github/CONTRIBUTING.md
8
-
9
- -->
@@ -1,11 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: npm
4
- directory: "/"
5
- schedule:
6
- interval: weekly
7
- open-pull-requests-limit: 10
8
- ignore:
9
- - dependency-name: html-crush
10
- versions:
11
- - 4.1.0
@@ -1 +0,0 @@
1
- <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 300"><path d="M322.869 65.213c0-13.843-11.222-25.065-25.065-25.065-13.844 0-25.066 11.222-25.066 25.065v133.683c0 13.843 11.222 25.065 25.066 25.065 13.843 0 25.065-11.222 25.065-25.065V65.213Z" stroke="url(#a)" stroke-width="5" stroke-miterlimit="10"/><path d="M218.012 65.213c0-13.843-11.222-25.065-25.066-25.065-13.843 0-25.065 11.222-25.065 25.065v133.683c0 13.843 11.222 25.065 25.065 25.065 13.844 0 25.066-11.222 25.066-25.065V65.213Z" stroke="url(#b)" stroke-width="5" stroke-miterlimit="10"/><path d="M317.555 80.632c8.53-10.903 6.607-26.656-4.296-35.186-10.903-8.53-26.656-6.608-35.187 4.295L173.403 183.519c-8.531 10.903-6.607 26.657 4.295 35.187 10.903 8.53 26.657 6.607 35.187-4.295l104.67-133.779Z" stroke="url(#c)" stroke-width="5" stroke-miterlimit="10"/><path d="M212.597 80.636c8.53-10.902 6.607-26.656-4.295-35.186-10.903-8.53-26.657-6.608-35.187 4.295L68.445 183.523c-8.53 10.903-6.607 26.657 4.296 35.187 10.902 8.53 26.656 6.607 35.186-4.295l104.67-133.779Z" stroke="url(#d)" stroke-width="5" stroke-miterlimit="10"/><rect x="168" y="234" width="158" height="36" rx="18" fill="#4F46E5"/><path d="M199.116 259v-13.091h7.849v1.406h-6.264v4.424h5.676v1.406h-5.676V259h-1.585Zm10.254 0v-9.818h1.457v1.483h.103c.179-.486.502-.88.971-1.183a2.865 2.865 0 0 1 1.585-.454c.111 0 .25.003.416.007.166.004.292.01.377.019v1.534a4.15 4.15 0 0 0-.352-.057 3.432 3.432 0 0 0-.568-.045c-.478 0-.904.1-1.279.3a2.264 2.264 0 0 0-.882.818 2.21 2.21 0 0 0-.32 1.183V259h-1.508Zm9.586.23a3.991 3.991 0 0 1-1.693-.351 2.909 2.909 0 0 1-1.209-1.03c-.298-.451-.447-.997-.447-1.636 0-.562.111-1.018.332-1.368.222-.354.518-.631.889-.831.371-.2.78-.349 1.227-.447.452-.103.906-.183 1.362-.243.596-.077 1.08-.134 1.451-.173.375-.042.647-.113.818-.211.175-.098.262-.268.262-.511v-.051c0-.631-.173-1.121-.518-1.47-.341-.35-.859-.524-1.553-.524-.72 0-1.285.157-1.694.473-.409.315-.697.652-.863 1.009l-1.432-.511c.256-.596.597-1.061 1.023-1.393.43-.337.899-.571 1.406-.703a5.815 5.815 0 0 1 1.509-.205c.315 0 .677.038 1.086.115.414.072.812.224 1.196.454.387.23.709.577.965 1.042.256.464.383 1.086.383 1.866V259h-1.508v-1.33h-.077c-.102.214-.273.442-.511.684-.239.243-.556.45-.953.62-.396.171-.88.256-1.451.256Zm.231-1.355c.596 0 1.099-.117 1.508-.352a2.39 2.39 0 0 0 1.253-2.077v-1.381c-.064.077-.205.147-.422.211-.213.06-.46.113-.741.16a31.625 31.625 0 0 1-1.445.192 5.737 5.737 0 0 0-1.099.249c-.337.111-.61.279-.819.505-.204.222-.306.524-.306.908 0 .524.193.92.581 1.189.392.264.889.396 1.49.396ZM226.21 259v-9.818h1.457v1.534h.128c.205-.524.535-.931.991-1.221.456-.294 1.003-.441 1.643-.441.647 0 1.186.147 1.617.441.434.29.773.697 1.016 1.221h.102c.252-.507.629-.91 1.132-1.208.503-.303 1.106-.454 1.809-.454.878 0 1.596.275 2.154.825.558.545.837 1.395.837 2.55V259h-1.508v-6.571c0-.724-.199-1.242-.595-1.553a2.2 2.2 0 0 0-1.4-.467c-.69 0-1.225.209-1.604.627-.379.413-.569.937-.569 1.572V259h-1.534v-6.724c0-.559-.181-1.008-.543-1.349-.363-.345-.829-.518-1.4-.518-.392 0-.759.104-1.1.313a2.373 2.373 0 0 0-.818.87c-.204.366-.307.79-.307 1.272V259h-1.508Zm19.761.205c-.946 0-1.762-.209-2.448-.627a4.207 4.207 0 0 1-1.579-1.764c-.367-.759-.55-1.641-.55-2.646 0-1.006.183-1.892.55-2.659.371-.772.886-1.373 1.547-1.803.664-.435 1.44-.652 2.326-.652.512 0 1.017.085 1.515.256.499.17.953.447 1.362.831.409.379.735.882.978 1.508.243.627.364 1.398.364 2.314v.639h-7.568v-1.304h6.034c0-.554-.111-1.048-.332-1.483a2.517 2.517 0 0 0-.934-1.029c-.4-.251-.873-.377-1.419-.377-.6 0-1.12.149-1.559.448a2.945 2.945 0 0 0-1.004 1.15c-.234.473-.351.98-.351 1.521v.87c0 .741.127 1.37.383 1.885.26.512.62.902 1.08 1.17.461.264.995.396 1.605.396.396 0 .754-.055 1.074-.166a2.29 2.29 0 0 0 .837-.511 2.33 2.33 0 0 0 .543-.857l1.458.409a3.226 3.226 0 0 1-.774 1.304 3.764 3.764 0 0 1-1.342.87c-.533.204-1.131.307-1.796.307Zm8.584-.205-2.991-9.818h1.585l2.122 7.517h.102l2.097-7.517h1.611l2.071 7.491h.102l2.122-7.491h1.586L261.97 259h-1.483l-2.148-7.543h-.153L256.038 259h-1.483Zm16.056.205c-.887 0-1.665-.211-2.334-.633-.664-.422-1.184-1.012-1.559-1.771-.371-.758-.556-1.645-.556-2.659 0-1.023.185-1.915.556-2.678.375-.763.895-1.355 1.559-1.777.669-.422 1.447-.633 2.334-.633.886 0 1.661.211 2.326.633.669.422 1.189 1.014 1.56 1.777.375.763.562 1.655.562 2.678 0 1.014-.187 1.901-.562 2.659-.371.759-.891 1.349-1.56 1.771-.665.422-1.44.633-2.326.633Zm0-1.356c.673 0 1.227-.172 1.661-.517a3.05 3.05 0 0 0 .966-1.362 5.23 5.23 0 0 0 .313-1.828 5.28 5.28 0 0 0-.313-1.834 3.096 3.096 0 0 0-.966-1.375c-.434-.349-.988-.524-1.661-.524-.674 0-1.228.175-1.662.524-.435.35-.757.808-.966 1.375a5.28 5.28 0 0 0-.313 1.834c0 .656.105 1.266.313 1.828a3.05 3.05 0 0 0 .966 1.362c.434.345.988.517 1.662.517Zm6.751 1.151v-9.818h1.458v1.483h.102c.179-.486.503-.88.971-1.183a2.868 2.868 0 0 1 1.586-.454c.11 0 .249.003.415.007.166.004.292.01.377.019v1.534a4.176 4.176 0 0 0-.351-.057 3.445 3.445 0 0 0-.569-.045c-.478 0-.904.1-1.279.3-.37.196-.664.469-.882.818a2.21 2.21 0 0 0-.319 1.183V259h-1.509Zm8.104-3.58-.026-1.866h.307l4.295-4.372h1.867l-4.577 4.628h-.128l-1.738 1.61Zm-1.407 3.58v-13.091h1.509V259h-1.509Zm6.239 0-3.835-4.858 1.074-1.048 4.679 5.906h-1.918Z" fill="#fff"/><defs><linearGradient id="a" x1="297.804" y1="40.148" x2="297.804" y2="223.961" gradientUnits="userSpaceOnUse"><stop stop-color="#4F46E5"/><stop offset="1" stop-color="#9C96FF"/></linearGradient><linearGradient id="b" x1="192.946" y1="40.148" x2="192.946" y2="223.961" gradientUnits="userSpaceOnUse"><stop stop-color="#4F46E5"/><stop offset="1" stop-color="#9C96FF"/></linearGradient><linearGradient id="c" x1="313.259" y1="45.446" x2="177.698" y2="218.706" gradientUnits="userSpaceOnUse"><stop stop-color="#4F46E5"/><stop offset="1" stop-color="#9C96FF"/></linearGradient><linearGradient id="d" x1="208.302" y1="45.45" x2="72.741" y2="218.71" gradientUnits="userSpaceOnUse"><stop stop-color="#4F46E5"/><stop offset="1" stop-color="#9C96FF"/></linearGradient></defs></svg>
@@ -1 +0,0 @@
1
- <svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 300"><path d="M322.869 65.213c0-13.843-11.222-25.065-25.065-25.065-13.844 0-25.066 11.222-25.066 25.065v133.683c0 13.843 11.222 25.065 25.066 25.065 13.843 0 25.065-11.222 25.065-25.065V65.213ZM218.012 65.213c0-13.843-11.222-25.065-25.066-25.065-13.843 0-25.065 11.222-25.065 25.065v133.683c0 13.843 11.222 25.065 25.065 25.065 13.844 0 25.066-11.222 25.066-25.065V65.213Z" stroke="#4F46E5" stroke-width="5" stroke-miterlimit="10"/><path d="M317.555 80.632c8.53-10.903 6.607-26.656-4.296-35.186-10.903-8.53-26.656-6.608-35.187 4.295L173.403 183.519c-8.531 10.903-6.607 26.657 4.295 35.187 10.903 8.53 26.657 6.607 35.187-4.295l104.67-133.779ZM212.597 80.636c8.53-10.902 6.607-26.656-4.295-35.186-10.903-8.53-26.657-6.608-35.187 4.295L68.445 183.523c-8.53 10.903-6.607 26.657 4.296 35.187 10.902 8.53 26.656 6.607 35.186-4.295l104.67-133.779Z" stroke="#4F46E5" stroke-width="5" stroke-miterlimit="10"/><rect x="165" y="234" width="158" height="36" rx="18" fill="#4F46E5"/><path d="M197.116 259v-13.091h7.849v1.406h-6.264v4.424h5.676v1.406h-5.676V259h-1.585Zm10.254 0v-9.818h1.457v1.483h.103c.179-.486.502-.88.971-1.183a2.865 2.865 0 0 1 1.585-.454c.111 0 .25.003.416.007.166.004.292.01.377.019v1.534a4.15 4.15 0 0 0-.352-.057 3.432 3.432 0 0 0-.568-.045c-.478 0-.904.1-1.279.3a2.264 2.264 0 0 0-.882.818 2.21 2.21 0 0 0-.32 1.183V259h-1.508Zm9.586.23a3.991 3.991 0 0 1-1.693-.351 2.909 2.909 0 0 1-1.209-1.03c-.298-.451-.447-.997-.447-1.636 0-.562.111-1.018.332-1.368.222-.354.518-.631.889-.831.371-.2.78-.349 1.227-.447.452-.103.906-.183 1.362-.243.596-.077 1.08-.134 1.451-.173.375-.042.647-.113.818-.211.175-.098.262-.268.262-.511v-.051c0-.631-.173-1.121-.518-1.47-.341-.35-.859-.524-1.553-.524-.72 0-1.285.157-1.694.473-.409.315-.697.652-.863 1.009l-1.432-.511c.256-.596.597-1.061 1.023-1.393.43-.337.899-.571 1.406-.703a5.815 5.815 0 0 1 1.509-.205c.315 0 .677.038 1.086.115.414.072.812.224 1.196.454.387.23.709.577.965 1.042.256.464.383 1.086.383 1.866V259h-1.508v-1.33h-.077c-.102.214-.273.442-.511.684-.239.243-.556.45-.953.62-.396.171-.88.256-1.451.256Zm.231-1.355c.596 0 1.099-.117 1.508-.352a2.39 2.39 0 0 0 1.253-2.077v-1.381c-.064.077-.205.147-.422.211-.213.06-.46.113-.741.16a31.625 31.625 0 0 1-1.445.192 5.737 5.737 0 0 0-1.099.249c-.337.111-.61.279-.819.505-.204.222-.306.524-.306.908 0 .524.193.92.581 1.189.392.264.889.396 1.49.396ZM224.21 259v-9.818h1.457v1.534h.128c.205-.524.535-.931.991-1.221.456-.294 1.003-.441 1.643-.441.647 0 1.186.147 1.617.441.434.29.773.697 1.016 1.221h.102c.252-.507.629-.91 1.132-1.208.503-.303 1.106-.454 1.809-.454.878 0 1.596.275 2.154.825.558.545.837 1.395.837 2.55V259h-1.508v-6.571c0-.724-.199-1.242-.595-1.553a2.2 2.2 0 0 0-1.4-.467c-.69 0-1.225.209-1.604.627-.379.413-.569.937-.569 1.572V259h-1.534v-6.724c0-.559-.181-1.008-.543-1.349-.363-.345-.829-.518-1.4-.518-.392 0-.759.104-1.1.313a2.373 2.373 0 0 0-.818.87c-.204.366-.307.79-.307 1.272V259h-1.508Zm19.761.205c-.946 0-1.762-.209-2.448-.627a4.207 4.207 0 0 1-1.579-1.764c-.367-.759-.55-1.641-.55-2.646 0-1.006.183-1.892.55-2.659.371-.772.886-1.373 1.547-1.803.664-.435 1.44-.652 2.326-.652.512 0 1.017.085 1.515.256.499.17.953.447 1.362.831.409.379.735.882.978 1.508.243.627.364 1.398.364 2.314v.639h-7.568v-1.304h6.034c0-.554-.111-1.048-.332-1.483a2.517 2.517 0 0 0-.934-1.029c-.4-.251-.873-.377-1.419-.377-.6 0-1.12.149-1.559.448a2.945 2.945 0 0 0-1.004 1.15c-.234.473-.351.98-.351 1.521v.87c0 .741.127 1.37.383 1.885.26.512.62.902 1.08 1.17.461.264.995.396 1.605.396.396 0 .754-.055 1.074-.166a2.29 2.29 0 0 0 .837-.511 2.33 2.33 0 0 0 .543-.857l1.458.409a3.226 3.226 0 0 1-.774 1.304 3.764 3.764 0 0 1-1.342.87c-.533.204-1.131.307-1.796.307Zm8.584-.205-2.991-9.818h1.585l2.122 7.517h.102l2.097-7.517h1.611l2.071 7.491h.102l2.122-7.491h1.586L259.97 259h-1.483l-2.148-7.543h-.153L254.038 259h-1.483Zm16.056.205c-.887 0-1.665-.211-2.334-.633-.664-.422-1.184-1.012-1.559-1.771-.371-.758-.556-1.645-.556-2.659 0-1.023.185-1.915.556-2.678.375-.763.895-1.355 1.559-1.777.669-.422 1.447-.633 2.334-.633.886 0 1.661.211 2.326.633.669.422 1.189 1.014 1.56 1.777.375.763.562 1.655.562 2.678 0 1.014-.187 1.901-.562 2.659-.371.759-.891 1.349-1.56 1.771-.665.422-1.44.633-2.326.633Zm0-1.356c.673 0 1.227-.172 1.661-.517a3.05 3.05 0 0 0 .966-1.362 5.23 5.23 0 0 0 .313-1.828 5.28 5.28 0 0 0-.313-1.834 3.096 3.096 0 0 0-.966-1.375c-.434-.349-.988-.524-1.661-.524-.674 0-1.228.175-1.662.524-.435.35-.757.808-.966 1.375a5.28 5.28 0 0 0-.313 1.834c0 .656.105 1.266.313 1.828a3.05 3.05 0 0 0 .966 1.362c.434.345.988.517 1.662.517Zm6.751 1.151v-9.818h1.458v1.483h.102c.179-.486.503-.88.971-1.183a2.868 2.868 0 0 1 1.586-.454c.11 0 .249.003.415.007.166.004.292.01.377.019v1.534a4.176 4.176 0 0 0-.351-.057 3.445 3.445 0 0 0-.569-.045c-.478 0-.904.1-1.279.3-.37.196-.664.469-.882.818a2.21 2.21 0 0 0-.319 1.183V259h-1.509Zm8.104-3.58-.026-1.866h.307l4.295-4.372h1.867l-4.577 4.628h-.128l-1.738 1.61Zm-1.407 3.58v-13.091h1.509V259h-1.509Zm6.239 0-3.835-4.858 1.074-1.048 4.679 5.906h-1.918Z" fill="#fff"/></svg>
@@ -1,28 +0,0 @@
1
- # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3
-
4
- name: Node.js CI
5
-
6
- on:
7
- push:
8
- branches: [master]
9
- pull_request:
10
-
11
- jobs:
12
- build:
13
- runs-on: ubuntu-latest
14
-
15
- strategy:
16
- matrix:
17
- node-version: [14, 16, 18]
18
-
19
- steps:
20
- - uses: actions/checkout@v2
21
- - name: Use Node.js ${{ matrix.node-version }}
22
- uses: actions/setup-node@v1
23
- with:
24
- node-version: ${{ matrix.node-version }}
25
- - run: npm install
26
- - run: npm test
27
- env:
28
- CI: true
@@ -1,13 +0,0 @@
1
- Variable from attribute: Example
2
-
3
- Variable from locals attribute: bar
4
-
5
-
6
- Variable from page: maizzle-ci
7
-
8
- Variable from attribute: Nested component
9
-
10
- Variable from locals attribute: bar (nested)
11
-
12
-
13
- Variable from page (nested): maizzle-ci
@@ -1,99 +0,0 @@
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,81 +0,0 @@
1
- <!-- Append -->
2
- <div>testing append</div>
3
- <!-- Prepend -->
4
- <div>testing prepend</div>
5
-
6
- <!-- Uppercase -->
7
- <div>TEST</div>
8
- <!-- Lowercase -->
9
- <div>test</div>
10
- <!-- Capitalize -->
11
- <div>Test</div>
12
-
13
- <!-- Ceil -->
14
- <div>2</div>
15
- <!-- Floor -->
16
- <div>1</div>
17
- <!-- Round -->
18
- <div>1235</div>
19
-
20
- <!-- Escape -->
21
- <div>&#34;&amp;&#39;&lt;&gt;</div>
22
- <!-- Escape Once -->
23
- <div>1 &lt; 2 &amp; 3</div>
24
-
25
- <!-- lstrip -->
26
- <div>test </div>
27
- <!-- rstrip -->
28
- <div> test</div>
29
- <!-- trim -->
30
- <div>test</div>
31
-
32
- <!-- Minus -->
33
- <div>1.02</div>
34
- <!-- Plus -->
35
- <div>5.02</div>
36
- <!-- Times -->
37
- <div>12.08</div>
38
- <!-- Divide -->
39
- <div>6.04</div>
40
- <!-- Modulo -->
41
- <div>1</div>
42
-
43
- <!-- Newline to br -->
44
- <div><br> test<br> test<br></div>
45
- <!-- Strip newlines -->
46
- <div> test test</div>
47
-
48
- <!-- Remove -->
49
- <div>I sted to see the t through the </div>
50
- <!-- Remove First -->
51
- <div>I sted to see the train through the rain</div>
52
-
53
- <!-- Replace -->
54
- <div>testestest</div>
55
- <!-- Replace First -->
56
- <div>testest</div>
57
-
58
- <!-- Size -->
59
- <div>33</div>
60
-
61
- <!-- Slice -->
62
- <div>est</div>
63
- <!-- Slice with endIndex -->
64
- <div>tes</div>
65
-
66
- <!-- Truncate -->
67
- <div>Ground control to...</div>
68
- <!-- Truncate (do nothing) -->
69
- <div>Ground control to</div>
70
- <!-- Truncate with custom ellipsis -->
71
- <div>Ground control to no one</div>
72
-
73
- <!-- Truncate words -->
74
- <div>Ground control...</div>
75
- <!-- Truncate words with custom ellipsis -->
76
- <div>Ground control over and out</div>
77
-
78
- <!-- URL decode -->
79
- <div>'Stop!' said Fred</div>
80
- <!-- URL encode -->
81
- <div>user%40example.com</div>
@@ -1,9 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <title>test></title>
5
- </head>
6
- <body>
7
- <div>test</div>
8
- </body>
9
- </html>
@@ -1,19 +0,0 @@
1
- <component
2
- src="test/stubs/components/component.html"
3
- text="Example"
4
- locals='{
5
- "foo": "bar"
6
- }'
7
- >
8
- <p>Variable from page: [[ page.env ]]</p>
9
-
10
- <component
11
- src="test/stubs/components/component.html"
12
- text="Nested component"
13
- locals='{
14
- "foo": "bar (nested)"
15
- }'
16
- >
17
- <p>Variable from page (nested): [[ page.env ]]</p>
18
- </component>
19
- </component>
@@ -1,101 +0,0 @@
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>