@maizzle/framework 4.2.1 → 4.2.2

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.2.1",
3
+ "version": "4.2.2",
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,7 +35,8 @@ module.exports = {
35
35
  important: true,
36
36
  content: {
37
37
  files: [
38
- './src/**/*.*',
38
+ './src/components/**.html',
39
+ './src/layouts/**.html',
39
40
  {raw: html, extension: 'html'}
40
41
  ]
41
42
  }
@@ -46,7 +47,6 @@ module.exports = {
46
47
  config.content = {
47
48
  files: [
48
49
  ...config.content,
49
- './src/**/*.*',
50
50
  {raw: html, extension: 'html'}
51
51
  ]
52
52
  }
@@ -22,11 +22,16 @@ module.exports = async (html, config = {}, direct = false) => {
22
22
  filters.postcss = css => PostCSS.process(css, maizzleConfig)
23
23
  filters.tailwindcss = css => Tailwind.compile(css, html, tailwindConfig, maizzleConfig)
24
24
 
25
- return posthtml([
25
+ const posthtmlPlugins = [
26
26
  styleDataEmbed(),
27
- posthtmlContent(filters),
28
- safeClassNames()
29
- ])
27
+ posthtmlContent(filters)
28
+ ]
29
+
30
+ if (get(config, 'safeClassNames') !== false) {
31
+ posthtmlPlugins.push(safeClassNames())
32
+ }
33
+
34
+ return posthtml(posthtmlPlugins)
30
35
  .process(html, posthtmlOptions)
31
36
  .then(result => result.html)
32
37
  }
@@ -111,5 +111,5 @@ test('uses custom postcss plugins from the maizzle config', async t => {
111
111
  const css = await Tailwind.compile('.test {transform: scale(0.5)}', '<div class="test">Test</a>', {}, maizzleConfig)
112
112
 
113
113
  t.not(css, undefined)
114
- t.is(css.trim(), '.inline {display: inline !important} .table {display: table !important} .contents {display: contents !important} .truncate {overflow: hidden !important;text-overflow: ellipsis !important;white-space: nowrap !important} .uppercase {text-transform: uppercase !important} .lowercase {text-transform: lowercase !important} .capitalize {text-transform: capitalize !important} .test {-webkit-transform: scale(0.5);transform: scale(0.5)}')
114
+ t.is(css.trim(), '.test {-webkit-transform: scale(0.5);transform: scale(0.5)}')
115
115
  })