@maizzle/framework 4.7.5 → 4.7.6
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 +4 -2
- package/types/baseUrl.d.ts +79 -0
- package/types/build.d.ts +74 -0
- package/types/components.d.ts +177 -0
- package/types/config.d.ts +341 -0
- package/types/events.d.ts +105 -0
- package/types/expressions.d.ts +78 -0
- package/types/fetch.d.ts +143 -0
- package/types/index.d.ts +187 -0
- package/types/inlineCss.d.ts +207 -0
- package/types/layouts.d.ts +39 -0
- package/types/markdown.d.ts +31 -0
- package/types/minify.d.ts +136 -0
- package/types/plaintext.d.ts +62 -0
- package/types/posthtml.d.ts +195 -0
- package/types/removeUnusedCss.d.ts +115 -0
- package/types/render.d.ts +130 -0
- package/types/tailwind.d.ts +22 -0
- package/types/templates.d.ts +167 -0
- package/types/urlParameters.d.ts +39 -0
- package/types/widowWords.d.ts +56 -0
- package/src/index.d.ts +0 -2141
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export default interface TailwindConfig {
|
|
2
|
+
/**
|
|
3
|
+
Path to the Tailwind config file.
|
|
4
|
+
|
|
5
|
+
@default 'tailwind.config.js'
|
|
6
|
+
*/
|
|
7
|
+
config?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
Path to your main CSS file, that will be compiled with Tailwind CSS.
|
|
11
|
+
|
|
12
|
+
@default 'src/css/tailwind.css'
|
|
13
|
+
*/
|
|
14
|
+
css?: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
Pre-compiled CSS. Skip Tailwind CSS processing by providing your own CSS string.
|
|
18
|
+
|
|
19
|
+
@default ''
|
|
20
|
+
*/
|
|
21
|
+
compiled?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type Config from './config';
|
|
2
|
+
import type PlaintextConfig from './plaintext';
|
|
3
|
+
|
|
4
|
+
export default interface TemplatesConfig {
|
|
5
|
+
/**
|
|
6
|
+
Directory where Maizzle should look for Templates to compile.
|
|
7
|
+
|
|
8
|
+
@default 'src/templates'
|
|
9
|
+
|
|
10
|
+
@example
|
|
11
|
+
```
|
|
12
|
+
module.exports = {
|
|
13
|
+
build: {
|
|
14
|
+
templates: {
|
|
15
|
+
source: 'src/templates'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
*/
|
|
21
|
+
source?:
|
|
22
|
+
| string
|
|
23
|
+
| Array<string | TemplatesConfig>
|
|
24
|
+
| ((config: Config) => string | string[]);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
Define what file extensions your Templates use.
|
|
28
|
+
Maizzle will only compile files from your `source` directory that have these extensions.
|
|
29
|
+
|
|
30
|
+
@default 'html'
|
|
31
|
+
|
|
32
|
+
@example
|
|
33
|
+
```
|
|
34
|
+
module.exports = {
|
|
35
|
+
build: {
|
|
36
|
+
templates: {
|
|
37
|
+
filetypes: ['html', 'blade.php']
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
*/
|
|
43
|
+
filetypes?: string | string[];
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
Define the output path for compiled Templates, and what file extension they should use.
|
|
47
|
+
|
|
48
|
+
@example
|
|
49
|
+
```
|
|
50
|
+
module.exports = {
|
|
51
|
+
build: {
|
|
52
|
+
templates: {
|
|
53
|
+
destination: {
|
|
54
|
+
path: 'build_production',
|
|
55
|
+
extension: 'html'
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
*/
|
|
62
|
+
destination?: {
|
|
63
|
+
/**
|
|
64
|
+
Directory where Maizzle should output compiled Templates.
|
|
65
|
+
|
|
66
|
+
@default 'build_{env}'
|
|
67
|
+
*/
|
|
68
|
+
path?: string;
|
|
69
|
+
/**
|
|
70
|
+
File extension to be used for compiled Templates.
|
|
71
|
+
|
|
72
|
+
@default 'html'
|
|
73
|
+
*/
|
|
74
|
+
extension: string;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
Source and destination directories for your asset files.
|
|
79
|
+
|
|
80
|
+
@example
|
|
81
|
+
```
|
|
82
|
+
module.exports = {
|
|
83
|
+
build: {
|
|
84
|
+
templates: {
|
|
85
|
+
assets: {
|
|
86
|
+
source: 'src/images',
|
|
87
|
+
destination: 'images'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
*/
|
|
94
|
+
assets?: {
|
|
95
|
+
/**
|
|
96
|
+
Directory where Maizzle should look for asset files.
|
|
97
|
+
|
|
98
|
+
@default ''
|
|
99
|
+
*/
|
|
100
|
+
source?: string;
|
|
101
|
+
/**
|
|
102
|
+
Directory where asset files should be copied to.
|
|
103
|
+
|
|
104
|
+
@default 'assets'
|
|
105
|
+
*/
|
|
106
|
+
destination?: string;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
Configure plaintext generation.
|
|
111
|
+
|
|
112
|
+
@example
|
|
113
|
+
```
|
|
114
|
+
module.exports = {
|
|
115
|
+
build: {
|
|
116
|
+
plaintext: {
|
|
117
|
+
skipHtmlDecoding: true,
|
|
118
|
+
destination: {
|
|
119
|
+
path: 'dist/brand/plaintext',
|
|
120
|
+
extension: 'rtxt'
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
*/
|
|
127
|
+
plaintext?: boolean | PlaintextConfig;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
Paths to files or directories from your `source` that should _not_ be copied over to the build destination.
|
|
131
|
+
|
|
132
|
+
@default ['']
|
|
133
|
+
|
|
134
|
+
@example
|
|
135
|
+
```
|
|
136
|
+
module.exports = {
|
|
137
|
+
build: {
|
|
138
|
+
templates: {
|
|
139
|
+
source: 'src/templates',
|
|
140
|
+
omit: ['1.html', 'archive/4.html'],
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
*/
|
|
146
|
+
omit?: string[];
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
Paths to files relative to your `source` directory that should not be parsed.
|
|
150
|
+
They will be copied over to the build destination as-is.
|
|
151
|
+
|
|
152
|
+
@default ['']
|
|
153
|
+
|
|
154
|
+
@example
|
|
155
|
+
```
|
|
156
|
+
module.exports = {
|
|
157
|
+
build: {
|
|
158
|
+
templates: {
|
|
159
|
+
source: 'src/templates',
|
|
160
|
+
skip: ['1.html', 'archive/3.html'],
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
*/
|
|
166
|
+
skip?: string | string[];
|
|
167
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type {StringifyOptions} from 'query-string';
|
|
2
|
+
|
|
3
|
+
export default interface URLParametersConfig {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
|
|
6
|
+
_options?: {
|
|
7
|
+
/**
|
|
8
|
+
Array of tag names to process. Only URLs inside `href` attributes of tags in this array will be processed.
|
|
9
|
+
|
|
10
|
+
@default ['a']
|
|
11
|
+
|
|
12
|
+
@example
|
|
13
|
+
```
|
|
14
|
+
module.exports = {
|
|
15
|
+
urlParameters: {
|
|
16
|
+
_options: {
|
|
17
|
+
tags: ['a[href*="example.com"]'],
|
|
18
|
+
},
|
|
19
|
+
utm_source: 'maizzle',
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
*/
|
|
24
|
+
tags?: string[];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
By default, query parameters are appended only to valid URLs.
|
|
28
|
+
Disable strict mode to append parameters to any string.
|
|
29
|
+
|
|
30
|
+
@default true
|
|
31
|
+
*/
|
|
32
|
+
strict?: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
Options to pass to the `query-string` library.
|
|
36
|
+
*/
|
|
37
|
+
qs?: StringifyOptions;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export default interface WidowWordsConfig {
|
|
2
|
+
/**
|
|
3
|
+
The attribute name to use.
|
|
4
|
+
|
|
5
|
+
@default 'prevent-widows'
|
|
6
|
+
*/
|
|
7
|
+
attrName?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
Replace all widow word `nbsp;` instances with a single space.
|
|
11
|
+
This is basically the opposite of preventing widow words.
|
|
12
|
+
|
|
13
|
+
@default false
|
|
14
|
+
*/
|
|
15
|
+
removeWindowPreventionMeasures?: boolean;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
Convert the space entity to the `targetLanguage`.
|
|
19
|
+
|
|
20
|
+
@default true
|
|
21
|
+
*/
|
|
22
|
+
convertEntities?: boolean;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
Language to encode non-breaking spaces in.
|
|
26
|
+
|
|
27
|
+
@default 'html'
|
|
28
|
+
*/
|
|
29
|
+
targetLanguage?: 'html' | 'css' | 'js';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
Should whitespace in front of dashes (-), n-dashes (–) or m-dashes (—) be replaced with a ` `.
|
|
33
|
+
|
|
34
|
+
@default true
|
|
35
|
+
*/
|
|
36
|
+
hyphens?: boolean;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
The minimum amount of words in a target string, in order to trigger the transformer.
|
|
40
|
+
|
|
41
|
+
@default 3
|
|
42
|
+
*/
|
|
43
|
+
minWordCount?: number;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
The minimum amount non-whitespace characters in a target string, in order to trigger the transformer.
|
|
47
|
+
|
|
48
|
+
@default 20
|
|
49
|
+
*/
|
|
50
|
+
minCharCount?: number;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
Start/end pairs of strings that will prevent the transformer from removing widow words inside them.
|
|
54
|
+
*/
|
|
55
|
+
ignore?: string | string[];
|
|
56
|
+
}
|