@maizzle/framework 4.8.0 → 4.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maizzle/framework",
3
- "version": "4.8.0",
3
+ "version": "4.8.1",
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",
@@ -37,9 +37,9 @@
37
37
  "release": "np"
38
38
  },
39
39
  "files": [
40
- "src/**/*",
41
- "types/**/*",
42
- "bin/*"
40
+ "src",
41
+ "types",
42
+ "bin"
43
43
  ],
44
44
  "dependencies": {
45
45
  "@maizzle/cli": "^1.5.1",
@@ -16,10 +16,11 @@ module.exports = async (html, config) => {
16
16
  const expressionsOptions = merge(
17
17
  {
18
18
  loopTags: ['each', 'for'],
19
+ missingLocal: '{local}',
19
20
  strictMode: false
20
21
  },
21
- get(config, 'build.posthtml.expressions', {}),
22
- get(componentsUserOptions, 'expressions', {})
22
+ get(componentsUserOptions, 'expressions', {}),
23
+ get(config, 'build.posthtml.expressions', {})
23
24
  )
24
25
 
25
26
  const locals = merge(
@@ -75,4 +75,26 @@ export default interface ExpressionsConfig {
75
75
  @default false
76
76
  */
77
77
  strictMode?: boolean;
78
+
79
+ /**
80
+ What to render when referencing a value that is not defined in `locals`.
81
+
82
+ By default the original expression reference will be output, i.e. `{{ foo }}`.
83
+
84
+ @default '{local}'
85
+
86
+ @example
87
+
88
+ ```
89
+ // Output empty string if value is not defined
90
+ missingLocal: ''
91
+
92
+ // Output original reference if value is not defined
93
+ missingLocal: '{local}'
94
+
95
+ // Output custom string if value is not defined
96
+ missingLocal: 'ERR_NO_VALUE: {local}'
97
+ ```
98
+ */
99
+ missingLocal?: string;
78
100
  }