@maizzle/framework 4.4.4 → 4.4.5

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.4.4",
3
+ "version": "4.4.5",
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",
@@ -92,7 +92,9 @@ module.exports = {
92
92
 
93
93
  if (buildTemplates) {
94
94
  const templateObjects = Array.isArray(buildTemplates) ? buildTemplates : [buildTemplates]
95
- const fileTypes = get(buildTemplates, 'filetypes', 'html')
95
+ const configFileTypes = get(buildTemplates, 'filetypes', ['html'])
96
+ const fileTypes = Array.isArray(configFileTypes) ? configFileTypes : configFileTypes.split('|')
97
+ const fileTypesPattern = fileTypes.length > 1 ? `{${fileTypes.join(',')}}` : fileTypes[0]
96
98
 
97
99
  templateObjects.forEach(template => {
98
100
  const source = get(template, 'source')
@@ -101,7 +103,7 @@ module.exports = {
101
103
  const sources = source(config)
102
104
 
103
105
  if (Array.isArray(sources)) {
104
- sources.map(s => tailwindConfig.content.files.push(`${s}/**/*.${fileTypes}`))
106
+ sources.map(s => tailwindConfig.content.files.push(`${s}/**/*.${fileTypesPattern}`))
105
107
  } else if (typeof sources === 'string') {
106
108
  tailwindConfig.content.files.push(sources)
107
109
  }
@@ -114,7 +116,7 @@ module.exports = {
114
116
 
115
117
  // Default behavior - directory sources as a string
116
118
  else {
117
- tailwindConfig.content.files.push(`${source}/**/*.${fileTypes}`)
119
+ tailwindConfig.content.files.push(`${source}/**/*.${fileTypesPattern}`)
118
120
  }
119
121
  })
120
122
  }
@@ -33,7 +33,7 @@ module.exports = async (html, config = {}, direct = false) => {
33
33
  {heads: '{{', tails: '}}'},
34
34
  {heads: '{%', tails: '%}'}
35
35
  ],
36
- whitelist: [...get(config, 'whitelist', []), ...safelist]
36
+ whitelist: get(config, 'whitelist', safelist)
37
37
  }
38
38
 
39
39
  const options = merge(defaultOptions, config)