Skip to content

Commit

Permalink
Merge pull request #219 from maizzle/refactor/stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
cossssmin authored Sep 4, 2023
2 parents d8e453b + b7cefa0 commit f6789cb
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 46 deletions.
2 changes: 2 additions & 0 deletions src/stubs/config/base.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/** @type {import('@maizzle/framework').Config} */

module.exports = {
build: {
templates: {
Expand Down
31 changes: 26 additions & 5 deletions src/stubs/config/full.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/** @type {import('@maizzle/framework').Config} */

module.exports = {
build: {
browsersync: {
Expand Down Expand Up @@ -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: {
Expand All @@ -142,8 +144,9 @@ module.exports = {
backend: [
{ heads: '{{', tails: '}}' },
],
removeHTMLComments: false,
removeCSSComments: false,
removeHTMLComments: true,
removeCSSComments: true,
removeInlinedSelectors: true,
uglify: false,
doNotRemoveHTMLCommentsWhoseOpeningTagContains: ['[if', '[endif'],
},
Expand Down Expand Up @@ -184,6 +187,8 @@ module.exports = {
lineLengthLimit: 500,
removeIndentations: true,
removeLineBreaks: false,
removeCSSComments: true,
removeHTMLComments: true,
breakToTheLeftOf: [
'</td',
'<html',
Expand All @@ -210,6 +215,22 @@ module.exports = {
markdownit: {},
plugins: [],
},
sixHex: true,
widowWords: {
attrName: 'prevent-widows',
removeWindowPreventionMeasures: false,
convertEntities: true,
targetLanguage: 'html',
hyphens: true,
minWordCount: 3,
minCharCount: 20,
ignore: [
{
heads: '{{',
tails: '}}'
},
],
},
events: {
beforeCreate(config) {},
beforeRender(html, config) {
Expand Down
45 changes: 8 additions & 37 deletions src/stubs/config/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/** @type {import('tailwindcss').Config} */

module.exports = {
theme: {
screens: {
xs: {max: '425px'},
sm: {max: '600px'},
xs: {max: '425px'},
},
extend: {
spacing: {
Expand Down Expand Up @@ -48,37 +50,6 @@ module.exports = {
72: '288px',
80: '320px',
96: '384px',
97.5: '390px',
120: '480px',
150: '600px',
160: '640px',
175: '700px',
'1/2': '50%',
'1/3': '33.333333%',
'2/3': '66.666667%',
'1/4': '25%',
'2/4': '50%',
'3/4': '75%',
'1/5': '20%',
'2/5': '40%',
'3/5': '60%',
'4/5': '80%',
'1/6': '16.666667%',
'2/6': '33.333333%',
'3/6': '50%',
'4/6': '66.666667%',
'5/6': '83.333333%',
'1/12': '8.333333%',
'2/12': '16.666667%',
'3/12': '25%',
'4/12': '33.333333%',
'5/12': '41.666667%',
'6/12': '50%',
'7/12': '58.333333%',
'8/12': '66.666667%',
'9/12': '75%',
'10/12': '83.333333%',
'11/12': '91.666667%',
},
borderRadius: {
none: '0px',
Expand Down Expand Up @@ -124,13 +95,13 @@ module.exports = {
'9xl': '128px',
},
letterSpacing: theme => ({
...theme('spacing'),
...theme('width'),
}),
lineHeight: theme => ({
...theme('spacing'),
...theme('width'),
}),
maxWidth: theme => ({
...theme('spacing'),
...theme('width'),
xs: '160px',
sm: '192px',
md: '224px',
Expand All @@ -144,10 +115,10 @@ module.exports = {
'7xl': '640px',
}),
minHeight: theme => ({
...theme('spacing'),
...theme('width'),
}),
minWidth: theme => ({
...theme('spacing'),
...theme('width'),
}),
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/stubs/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</div>
</if>
<div role="article" aria-roledescription="email" aria-label="{{{ page.title || '' }}}" lang="{{ page.language || 'en' }}">
<slot:template />
<content />
</div>
</body>
</html>
4 changes: 1 addition & 3 deletions src/stubs/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
---

<x-main>
<fill:template>
<!-- your HTML... -->
</fill:template>
<!-- your HTML... -->
</x-main>

0 comments on commit f6789cb

Please sign in to comment.