From b7cefa0aaedc154847274c7a48576b0b2424af9d Mon Sep 17 00:00:00 2001 From: Cosmin Popovici Date: Mon, 4 Sep 2023 16:43:40 +0300 Subject: [PATCH] refactor: stubs --- src/stubs/config/base.js | 2 ++ src/stubs/config/full.js | 31 ++++++++++++++++---- src/stubs/config/tailwind.config.js | 45 +++++------------------------ src/stubs/layout.html | 2 +- src/stubs/template.html | 4 +-- 5 files changed, 38 insertions(+), 46 deletions(-) diff --git a/src/stubs/config/base.js b/src/stubs/config/base.js index 6693bad..935b8fb 100644 --- a/src/stubs/config/base.js +++ b/src/stubs/config/base.js @@ -1,3 +1,5 @@ +/** @type {import('@maizzle/framework').Config} */ + module.exports = { build: { templates: { diff --git a/src/stubs/config/full.js b/src/stubs/config/full.js index f78e35a..77d5d69 100644 --- a/src/stubs/config/full.js +++ b/src/stubs/config/full.js @@ -1,3 +1,5 @@ +/** @type {import('@maizzle/framework').Config} */ + module.exports = { build: { browsersync: { @@ -115,13 +117,13 @@ module.exports = { }, fail: 'silent', // or 'verbose' }, + applyTransformers: true, baseURL: { url: '', - allTags: true, - styleTag: true, - inlineCss: true, tags: [], attributes: {}, + styleTag: true, + inlineCss: true, }, inlineCSS: { styleToAttribute: { @@ -142,8 +144,9 @@ module.exports = { backend: [ { heads: '{{', tails: '}}' }, ], - removeHTMLComments: false, - removeCSSComments: false, + removeHTMLComments: true, + removeCSSComments: true, + removeInlinedSelectors: true, uglify: false, doNotRemoveHTMLCommentsWhoseOpeningTagContains: ['[if', '[endif'], }, @@ -184,6 +187,8 @@ module.exports = { lineLengthLimit: 500, removeIndentations: true, removeLineBreaks: false, + removeCSSComments: true, + removeHTMLComments: true, breakToTheLeftOf: [ ' ({ - ...theme('spacing'), + ...theme('width'), }), lineHeight: theme => ({ - ...theme('spacing'), + ...theme('width'), }), maxWidth: theme => ({ - ...theme('spacing'), + ...theme('width'), xs: '160px', sm: '192px', md: '224px', @@ -144,10 +115,10 @@ module.exports = { '7xl': '640px', }), minHeight: theme => ({ - ...theme('spacing'), + ...theme('width'), }), minWidth: theme => ({ - ...theme('spacing'), + ...theme('width'), }), }, }, diff --git a/src/stubs/layout.html b/src/stubs/layout.html index c02d597..038fe58 100644 --- a/src/stubs/layout.html +++ b/src/stubs/layout.html @@ -35,7 +35,7 @@
- +
diff --git a/src/stubs/template.html b/src/stubs/template.html index 9e2bb82..e5b74bc 100644 --- a/src/stubs/template.html +++ b/src/stubs/template.html @@ -3,7 +3,5 @@ --- - - - +