@maizzle/framework 4.7.4 → 4.7.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.7.4",
3
+ "version": "4.7.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",
@@ -46,9 +46,9 @@
46
46
  "browser-sync": "^3.0.2",
47
47
  "color-shorthand-hex-to-six-digit": "^3.0.2",
48
48
  "email-comb": "^5.2.0",
49
+ "fast-glob": "^3.3.2",
49
50
  "front-matter": "^4.0.0",
50
51
  "fs-extra": "^11.2.0",
51
- "glob-promise": "^4.1.0",
52
52
  "html-crush": "^4.0.0",
53
53
  "is-url-superb": "^5.0.0",
54
54
  "juice": "^10.0.0",
@@ -1,6 +1,6 @@
1
1
  const path = require('path')
2
2
  const fs = require('fs-extra')
3
- const glob = require('glob-promise')
3
+ const {glob} = require('fast-glob')
4
4
  const {get, merge, isEmpty} = require('lodash')
5
5
 
6
6
  const Config = require('../config')
@@ -73,9 +73,10 @@ module.exports = async (env, spinner, config) => {
73
73
 
74
74
  // Create a pipe-delimited list of allowed extensions
75
75
  // We only compile these, the rest are copied as-is
76
- const extensions = Array.isArray(templateConfig.filetypes)
77
- ? templateConfig.filetypes.join('|')
78
- : templateConfig.filetypes || get(templateConfig, 'filetypes', 'html')
76
+ const fileTypes = get(templateConfig, 'filetypes', 'html')
77
+ const extensionsList = Array.isArray(fileTypes)
78
+ ? fileTypes.join(',')
79
+ : fileTypes.split('|').join(',')
79
80
 
80
81
  // List of files that won't be copied to the output directory
81
82
  const omitted = Array.isArray(templateConfig.omit)
@@ -101,7 +102,10 @@ module.exports = async (env, spinner, config) => {
101
102
  .some(omit => path.normalize(file).includes(path.normalize(omit)))
102
103
  }})
103
104
  .then(async () => {
104
- const allSourceFiles = await glob(`${outputDir}/**/*.+(${extensions})`)
105
+ const extensions = extensionsList.includes(',')
106
+ ? `{${extensionsList}}`
107
+ : extensionsList
108
+ const allSourceFiles = await glob(`${outputDir}/**/*.${extensions}`)
105
109
 
106
110
  const skipped = Array.isArray(templateConfig.skip) ?
107
111
  templateConfig.skip :
@@ -223,7 +227,7 @@ module.exports = async (env, spinner, config) => {
223
227
  }
224
228
  }
225
229
 
226
- await glob(path.join(templateConfig.destination.path, '/**/*.*'))
230
+ await glob(path.join(templateConfig.destination.path, '/**').replace(/\\/g, '/'))
227
231
  .then(contents => {
228
232
  files = [...new Set([...files, ...contents])]
229
233
  })