@staticbolt/core 1.0.0-beta.0
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/LICENSE +22 -0
- package/README.md +70 -0
- package/lib/cli/index.d.mts +1 -0
- package/lib/cli/index.mjs +177 -0
- package/lib/cli/index.mjs.map +1 -0
- package/lib/dependency-tracker-BuZfopIj.mjs +485 -0
- package/lib/dependency-tracker-BuZfopIj.mjs.map +1 -0
- package/lib/index.d.mts +1734 -0
- package/lib/index.d.mts.map +1 -0
- package/lib/index.mjs +11 -0
- package/lib/index.mjs.map +1 -0
- package/lib/logger-BuxMGhij.mjs +190 -0
- package/lib/logger-BuxMGhij.mjs.map +1 -0
- package/lib/plugins/index.d.mts +1181 -0
- package/lib/plugins/index.d.mts.map +1 -0
- package/lib/plugins/index.mjs +8559 -0
- package/lib/plugins/index.mjs.map +1 -0
- package/package.json +112 -0
|
@@ -0,0 +1,1181 @@
|
|
|
1
|
+
import postcss from "postcss";
|
|
2
|
+
import { Config } from "svgo";
|
|
3
|
+
import * as babel from "@babel/core";
|
|
4
|
+
import { Pluggable } from "unified";
|
|
5
|
+
import { Plugin } from "@staticbolt/core";
|
|
6
|
+
|
|
7
|
+
//#region src/plugins/analyze-output/analyze-output-plugin.d.ts
|
|
8
|
+
interface AnalyzeOutputOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Delete unused files from the output directory.
|
|
11
|
+
*
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
deleteUnused?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Log unused files.
|
|
17
|
+
*
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
logUnusedFiles?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Glob patterns to skip files when analyzing.
|
|
23
|
+
*
|
|
24
|
+
* @default ["robots.txt", "sitemap.xml", "sw.js", "workbox-*.js"]
|
|
25
|
+
*/
|
|
26
|
+
exclude?: string[];
|
|
27
|
+
/**
|
|
28
|
+
* Specifies the size limit (in kilobytes) for each file type to trigger a warning. Set to `false` to disable warnings.
|
|
29
|
+
*
|
|
30
|
+
* @default { ".js": 150 }
|
|
31
|
+
*/
|
|
32
|
+
maxFileSize?: Record<string, number> | false;
|
|
33
|
+
}
|
|
34
|
+
declare function analyzeOutputPlugin(options?: AnalyzeOutputOptions): Plugin;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/plugins/bundle-packages/bundle-packages-plugin.d.ts
|
|
37
|
+
interface BundlePackagesOptions {
|
|
38
|
+
/** Output directory for bundled `node_modules` packages, relative to the build output directory. */
|
|
39
|
+
packagesDir?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Whether to use Terser for minification to reduce the final bundle size.
|
|
42
|
+
*
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
minifyUsingTerser?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Bundles specific packages into a single chunk for optimized loading.
|
|
48
|
+
*
|
|
49
|
+
* Useful for grouping related libraries (e.g., all React dependencies) or bundling CommonJS modules for browser compatibility.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* bundlePackagesPlugin({
|
|
53
|
+
* "react-bundle": ["react", "react-dom", "react-dom/client", "react/jsx-runtime", "scheduler"],
|
|
54
|
+
* });
|
|
55
|
+
*
|
|
56
|
+
* @key Chunk name
|
|
57
|
+
* @value Array of package names to include in the bundle
|
|
58
|
+
*/
|
|
59
|
+
chunks?: Record<string, string[]>;
|
|
60
|
+
/**
|
|
61
|
+
* Custom package resolver entries to override default resolution logic.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* bundlePackagesPlugin({
|
|
65
|
+
* resolvePackage: {
|
|
66
|
+
* "react-dom": {
|
|
67
|
+
* "./client": {
|
|
68
|
+
* production: "./cjs/react-dom.production.js",
|
|
69
|
+
* development: "./cjs/react-dom.development.js",
|
|
70
|
+
* },
|
|
71
|
+
* },
|
|
72
|
+
* },
|
|
73
|
+
* });
|
|
74
|
+
*
|
|
75
|
+
* @default {}
|
|
76
|
+
*/
|
|
77
|
+
resolvePackage?: Record<string, Record<string, string | {
|
|
78
|
+
production?: string;
|
|
79
|
+
development?: string;
|
|
80
|
+
}>>;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Bundles each `node_modules` package and its dependencies into separate files under `packagesDir`. The plugin scans files for
|
|
84
|
+
* imports and uses esbuild's tree-shaking capabilities to generate the bundles.
|
|
85
|
+
*/
|
|
86
|
+
declare function bundlePackagesPlugin(options?: BundlePackagesOptions): Plugin;
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/plugins/convert-images/convert-images-plugin.d.ts
|
|
89
|
+
type ImageFormat = "webp" | "avif" | "png" | "jpeg";
|
|
90
|
+
type ImagePreset = "default" | "photo" | "picture" | "drawing" | "icon" | "text";
|
|
91
|
+
interface ConvertImageOptions {
|
|
92
|
+
/**
|
|
93
|
+
* Format to convert images to.
|
|
94
|
+
*
|
|
95
|
+
* @default webp
|
|
96
|
+
*/
|
|
97
|
+
format?: ImageFormat;
|
|
98
|
+
/**
|
|
99
|
+
* Image quality of the output image `(1-100)`.
|
|
100
|
+
*
|
|
101
|
+
* @default 100
|
|
102
|
+
*/
|
|
103
|
+
quality?: number;
|
|
104
|
+
/**
|
|
105
|
+
* Presets for image compression (work for `WebP` format only).
|
|
106
|
+
*
|
|
107
|
+
* @default default
|
|
108
|
+
*/
|
|
109
|
+
preset?: ImagePreset;
|
|
110
|
+
/**
|
|
111
|
+
* Glob patterns to include in image processing.
|
|
112
|
+
*
|
|
113
|
+
* @default ["sources/assets/**\/*.{jpg,jpeg,png}"]
|
|
114
|
+
*/
|
|
115
|
+
include?: string[];
|
|
116
|
+
/**
|
|
117
|
+
* Glob patterns to ignore in image processing.
|
|
118
|
+
*
|
|
119
|
+
* @default [ ]
|
|
120
|
+
*/
|
|
121
|
+
exclude?: string[];
|
|
122
|
+
}
|
|
123
|
+
declare function convertImagePlugin(options?: ConvertImageOptions): Plugin;
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region src/plugins/copy-assets/copy-assets-plugin.d.ts
|
|
126
|
+
interface CopyAssetsOptions {
|
|
127
|
+
/**
|
|
128
|
+
* Glob patterns to copy and include.
|
|
129
|
+
*
|
|
130
|
+
* @default ["sources/assets/**\/*"]
|
|
131
|
+
*/
|
|
132
|
+
include?: string[];
|
|
133
|
+
/**
|
|
134
|
+
* Glob patterns to ignore and exclude when copying asset files.
|
|
135
|
+
*
|
|
136
|
+
* @default [ ]
|
|
137
|
+
*/
|
|
138
|
+
exclude?: string[];
|
|
139
|
+
}
|
|
140
|
+
declare function copyAssetsPlugin(options?: CopyAssetsOptions): Plugin;
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/plugins/custom-ease/easing-functions/types.d.ts
|
|
143
|
+
type EaseFunction = (t: number) => number;
|
|
144
|
+
interface CssLinear {
|
|
145
|
+
spring: (mass?: number, stiffness?: number, damping?: number, velocity?: number, duration?: number) => string;
|
|
146
|
+
inCirc: () => string;
|
|
147
|
+
inCubic: () => string;
|
|
148
|
+
inExpo: () => string;
|
|
149
|
+
inSine: () => string;
|
|
150
|
+
inQuad: () => string;
|
|
151
|
+
inQuart: () => string;
|
|
152
|
+
inQuint: () => string;
|
|
153
|
+
inBack: (c1?: number) => string;
|
|
154
|
+
inBounce: () => string;
|
|
155
|
+
inElastic: () => string;
|
|
156
|
+
inPoly: (n: number) => string;
|
|
157
|
+
inWobble: (bounciness: number) => string;
|
|
158
|
+
outCirc: () => string;
|
|
159
|
+
outCubic: () => string;
|
|
160
|
+
outExpo: () => string;
|
|
161
|
+
outSine: () => string;
|
|
162
|
+
outQuad: () => string;
|
|
163
|
+
outQuart: () => string;
|
|
164
|
+
outQuint: () => string;
|
|
165
|
+
outBack: (c1?: number) => string;
|
|
166
|
+
outBounce: () => string;
|
|
167
|
+
outElastic: () => string;
|
|
168
|
+
outPoly: (n: number) => string;
|
|
169
|
+
outWobble: (bounciness: number) => string;
|
|
170
|
+
inOutCirc: () => string;
|
|
171
|
+
inOutCubic: () => string;
|
|
172
|
+
inOutExpo: () => string;
|
|
173
|
+
inOutSine: () => string;
|
|
174
|
+
inOutQuad: () => string;
|
|
175
|
+
inOutQuart: () => string;
|
|
176
|
+
inOutQuint: () => string;
|
|
177
|
+
inOutBack: (c1?: number) => string;
|
|
178
|
+
inOutBounce: () => string;
|
|
179
|
+
inOutElastic: () => string;
|
|
180
|
+
inOutPoly: (n: number) => string;
|
|
181
|
+
inOutWobble: (bounciness: number) => string;
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/plugins/custom-ease/custom-ease-plugin.d.ts
|
|
185
|
+
interface CustomEasePluginOptions {
|
|
186
|
+
/**
|
|
187
|
+
* Transform JS calls like `cssLinear.outCubic()` into their CSS easing string.
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* const ease = cssLinear.outCubic();
|
|
191
|
+
* // → "cubic-bezier(0.215, 0.61, 0.355, 1)"
|
|
192
|
+
*
|
|
193
|
+
* @default false
|
|
194
|
+
*/
|
|
195
|
+
replaceInJS?: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Name of the JS function namespace used for easing calls. The plugin looks for calls like `<name>.<ease>()`.
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* const ease = cssLinear.outCubic();
|
|
201
|
+
*
|
|
202
|
+
* @default "cssLinear"
|
|
203
|
+
*/
|
|
204
|
+
jsFunctionName?: string;
|
|
205
|
+
/**
|
|
206
|
+
* Enable replacement of custom easing functions used in CSS.
|
|
207
|
+
*
|
|
208
|
+
* ```css
|
|
209
|
+
* :root {
|
|
210
|
+
* --custom-ease: --ease-out-cubic();
|
|
211
|
+
* }
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* @default true
|
|
215
|
+
*/
|
|
216
|
+
replaceInCSS?: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Prefix used to detect custom easing functions in CSS. Any function starting with this prefix will be replaced.
|
|
219
|
+
*
|
|
220
|
+
* ```css
|
|
221
|
+
* :root {
|
|
222
|
+
* --custom-ease: --ease-out-cubic();
|
|
223
|
+
* }
|
|
224
|
+
* ```
|
|
225
|
+
*
|
|
226
|
+
* @default "--ease-"
|
|
227
|
+
*/
|
|
228
|
+
cssFunctionPrefix?: string;
|
|
229
|
+
/**
|
|
230
|
+
* Also process custom easing functions inside inline `style` attributes in HTML.
|
|
231
|
+
*
|
|
232
|
+
* ```html
|
|
233
|
+
* <div style="--custom-ease: --ease-out-cubic()"></div>
|
|
234
|
+
* ```
|
|
235
|
+
*
|
|
236
|
+
* @default false
|
|
237
|
+
*/
|
|
238
|
+
replaceInHtmlStyleAttribute?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Additional custom easing definitions. Values can be either:
|
|
241
|
+
*
|
|
242
|
+
* - A CSS easing string
|
|
243
|
+
* - A function returning a JS easing function
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* const customEase = {
|
|
247
|
+
* "in-circ": "cubic-bezier(0.55, 0, 1, 0.45)",
|
|
248
|
+
* "out-poly": (n: number) => (t: number) => 1 - Math.pow(1 - t, n),
|
|
249
|
+
* };
|
|
250
|
+
*/
|
|
251
|
+
customEase?: Record<string, string | ((...arguments_: unknown[]) => EaseFunction)>;
|
|
252
|
+
/**
|
|
253
|
+
* Number of samples used when converting easing functions to CSS `linear()`.
|
|
254
|
+
*
|
|
255
|
+
* Represents a balance between output quality and performance.
|
|
256
|
+
*
|
|
257
|
+
* @default 50
|
|
258
|
+
*/
|
|
259
|
+
samples?: number;
|
|
260
|
+
}
|
|
261
|
+
declare function customEasePlugin(options?: CustomEasePluginOptions): Plugin;
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region src/plugins/i18n/i18n-plugin.d.ts
|
|
264
|
+
interface I18nPluginOptions {
|
|
265
|
+
/**
|
|
266
|
+
* The default locale.
|
|
267
|
+
*
|
|
268
|
+
* @default "en"
|
|
269
|
+
*/
|
|
270
|
+
defaultLocale?: string;
|
|
271
|
+
/**
|
|
272
|
+
* The supported locales.
|
|
273
|
+
*
|
|
274
|
+
* @default ["en"]
|
|
275
|
+
*/
|
|
276
|
+
supportedLocales?: string[];
|
|
277
|
+
/**
|
|
278
|
+
* The path to the locales directory.
|
|
279
|
+
*
|
|
280
|
+
* @default "./sources/locales"
|
|
281
|
+
*/
|
|
282
|
+
localesDirectory?: string;
|
|
283
|
+
/**
|
|
284
|
+
* The name of the i18n attribute.
|
|
285
|
+
*
|
|
286
|
+
* @default "i18n"
|
|
287
|
+
*/
|
|
288
|
+
i18nAttribute?: string;
|
|
289
|
+
/**
|
|
290
|
+
* The prefix to use for i18n attributes.
|
|
291
|
+
*
|
|
292
|
+
* @default "i18n-attr-"
|
|
293
|
+
*/
|
|
294
|
+
i18nAttributePrefix?: string;
|
|
295
|
+
/**
|
|
296
|
+
* The prefix to use for i18n attributes.
|
|
297
|
+
*
|
|
298
|
+
* @default "i18n-placeholder-"
|
|
299
|
+
*/
|
|
300
|
+
placeholderPrefix?: string;
|
|
301
|
+
}
|
|
302
|
+
declare function i18nPlugin(options?: I18nPluginOptions): Plugin[];
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region src/plugins/import-as-string/types.d.ts
|
|
305
|
+
interface ImportAsStringOptions {
|
|
306
|
+
/**
|
|
307
|
+
* - Whether to process the file and not just read it as a string.
|
|
308
|
+
* - **Default**: `true`
|
|
309
|
+
*/
|
|
310
|
+
process?: boolean;
|
|
311
|
+
/**
|
|
312
|
+
* - Whether to minify the contents of the file when `process` is `true`.
|
|
313
|
+
* - **Default**: `false`
|
|
314
|
+
*/
|
|
315
|
+
minify?: boolean;
|
|
316
|
+
/**
|
|
317
|
+
* - Whether to format the contents of the file when `process` is `true`.
|
|
318
|
+
* - **Default**: `false`
|
|
319
|
+
*/
|
|
320
|
+
format?: boolean;
|
|
321
|
+
/**
|
|
322
|
+
* - Whether to wrap the inlined string in a template literal.
|
|
323
|
+
* - **Default**: `false`
|
|
324
|
+
*/
|
|
325
|
+
templateLiteral?: boolean;
|
|
326
|
+
}
|
|
327
|
+
/** - Import a file and inline it as a string at build time. */
|
|
328
|
+
type import_as_string = (filePath: string, options?: ImportAsStringOptions) => string;
|
|
329
|
+
//#endregion
|
|
330
|
+
//#region src/plugins/import-as-string/import-as-string-plugin.d.ts
|
|
331
|
+
declare function importAsStringPlugin(): Plugin;
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region src/plugins/load-sources/load-sources-plugin.d.ts
|
|
334
|
+
interface LoadSourcesPluginOptions {
|
|
335
|
+
include: string[];
|
|
336
|
+
exclude?: string[];
|
|
337
|
+
}
|
|
338
|
+
declare function loadSourcesPlugin(options: LoadSourcesPluginOptions): Plugin;
|
|
339
|
+
//#endregion
|
|
340
|
+
//#region src/plugins/robots-text/robots-text-plugin.d.ts
|
|
341
|
+
interface RobotsTextOptions {
|
|
342
|
+
/**
|
|
343
|
+
* Generate `robots.txt`.
|
|
344
|
+
*
|
|
345
|
+
* @default [ ]
|
|
346
|
+
*/
|
|
347
|
+
rules?: {
|
|
348
|
+
userAgent: string;
|
|
349
|
+
allow?: string[];
|
|
350
|
+
disallow?: string[];
|
|
351
|
+
}[];
|
|
352
|
+
/**
|
|
353
|
+
* The output file path relative to output directory.
|
|
354
|
+
*
|
|
355
|
+
* @default "robots.txt"
|
|
356
|
+
*/
|
|
357
|
+
outfile?: string;
|
|
358
|
+
/** The path to the sitemap file. */
|
|
359
|
+
sitemapUrl?: string;
|
|
360
|
+
}
|
|
361
|
+
declare function robotsTextPlugin(options?: RobotsTextOptions): Plugin;
|
|
362
|
+
//#endregion
|
|
363
|
+
//#region src/plugins/service-worker/service-worker-plugin.d.ts
|
|
364
|
+
interface ServiceWorkerOptions {
|
|
365
|
+
/**
|
|
366
|
+
* Glob patterns for matching files.
|
|
367
|
+
*
|
|
368
|
+
* @default ["**\/*"]
|
|
369
|
+
*/
|
|
370
|
+
globPatterns?: string[];
|
|
371
|
+
/**
|
|
372
|
+
* Glob patterns for files to ignore.
|
|
373
|
+
*
|
|
374
|
+
* @default ["**\/node_modules/**\/*"]
|
|
375
|
+
*/
|
|
376
|
+
globIgnores?: string[];
|
|
377
|
+
/**
|
|
378
|
+
* Whether to follow symbolic links when matching glob patterns.
|
|
379
|
+
*
|
|
380
|
+
* @default true
|
|
381
|
+
*/
|
|
382
|
+
globFollow?: boolean;
|
|
383
|
+
/**
|
|
384
|
+
* Enforces strict mode for glob patterns.
|
|
385
|
+
*
|
|
386
|
+
* @default true
|
|
387
|
+
*/
|
|
388
|
+
globStrict?: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* Destination file for the generated service worker relative to the output directory.
|
|
391
|
+
*
|
|
392
|
+
* @default "sw.js"
|
|
393
|
+
*/
|
|
394
|
+
swDest?: string;
|
|
395
|
+
/**
|
|
396
|
+
* Determines whether source maps should be generated.
|
|
397
|
+
*
|
|
398
|
+
* @default false
|
|
399
|
+
*/
|
|
400
|
+
sourcemap?: boolean;
|
|
401
|
+
/**
|
|
402
|
+
* Whether to skip waiting and immediately activate the service worker.
|
|
403
|
+
*
|
|
404
|
+
* @default true
|
|
405
|
+
*/
|
|
406
|
+
skipWaiting?: boolean;
|
|
407
|
+
/**
|
|
408
|
+
* Whether the service worker should claim all available clients.
|
|
409
|
+
*
|
|
410
|
+
* @default true
|
|
411
|
+
*/
|
|
412
|
+
clientsClaim?: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* Whether to inline the Workbox runtime.
|
|
415
|
+
*
|
|
416
|
+
* @default false
|
|
417
|
+
*/
|
|
418
|
+
inlineWorkboxRuntime?: boolean;
|
|
419
|
+
/**
|
|
420
|
+
* Cleans up outdated caches during service worker activation.
|
|
421
|
+
*
|
|
422
|
+
* @default true
|
|
423
|
+
*/
|
|
424
|
+
cleanupOutdatedCaches?: boolean;
|
|
425
|
+
/**
|
|
426
|
+
* Enables offline Google Analytics support.
|
|
427
|
+
*
|
|
428
|
+
* @default false
|
|
429
|
+
*/
|
|
430
|
+
offlineGoogleAnalytics?: boolean;
|
|
431
|
+
/** Cache ID used for versioning. */
|
|
432
|
+
cacheId?: string;
|
|
433
|
+
/** The default directory index for cached URLs. */
|
|
434
|
+
directoryIndex?: string;
|
|
435
|
+
/**
|
|
436
|
+
* Maximum file size (in bytes) to cache.
|
|
437
|
+
*
|
|
438
|
+
* @default 2097152
|
|
439
|
+
*/
|
|
440
|
+
maximumFileSizeToCacheInBytes?: number;
|
|
441
|
+
/** Modifies URL prefixes for cached assets. */
|
|
442
|
+
modifyURLPrefix?: Record<string, string>;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Please don't forget to register the service worker in your HTML file.
|
|
446
|
+
*
|
|
447
|
+
* ```ts
|
|
448
|
+
* import { Workbox } from "workbox-window";
|
|
449
|
+
*
|
|
450
|
+
* if ("serviceWorker" in navigator && _production) {
|
|
451
|
+
* const wb = new Workbox("/sw.js");
|
|
452
|
+
* wb.register();
|
|
453
|
+
* }
|
|
454
|
+
* ```
|
|
455
|
+
*/
|
|
456
|
+
declare function serviceWorkerPlugin(options?: ServiceWorkerOptions): Plugin;
|
|
457
|
+
//#endregion
|
|
458
|
+
//#region src/plugins/sitemap/sitemap-plugin.d.ts
|
|
459
|
+
interface SitemapOptions {
|
|
460
|
+
/** The URL of the sitemap. */
|
|
461
|
+
sitemapUrl?: string;
|
|
462
|
+
/**
|
|
463
|
+
* The output sitemap file path relative to the output directory.
|
|
464
|
+
*
|
|
465
|
+
* @default "sitemap.xml"
|
|
466
|
+
*/
|
|
467
|
+
outfile?: string;
|
|
468
|
+
/**
|
|
469
|
+
* Glob patterns to match HTML files to include in the sitemap.
|
|
470
|
+
*
|
|
471
|
+
* **NOTE**: This is relative to the output directory.
|
|
472
|
+
*
|
|
473
|
+
* @default ["**\/*.html"]
|
|
474
|
+
*/
|
|
475
|
+
include?: string[];
|
|
476
|
+
/**
|
|
477
|
+
* Glob patterns to ignore HTML files from the sitemap.
|
|
478
|
+
*
|
|
479
|
+
* **NOTE**: This is relative to the output directory.
|
|
480
|
+
*
|
|
481
|
+
* @default [ ]
|
|
482
|
+
*/
|
|
483
|
+
exclude?: string[];
|
|
484
|
+
}
|
|
485
|
+
declare function sitemapPlugin(options?: SitemapOptions): Plugin;
|
|
486
|
+
//#endregion
|
|
487
|
+
//#region src/plugins/svgo/svgo-plugin.d.ts
|
|
488
|
+
interface svgoOptions {
|
|
489
|
+
/**
|
|
490
|
+
* Include SVG files to optimize and write to output directory.
|
|
491
|
+
*
|
|
492
|
+
* @default ["sources/assets/**\/*.svg"]
|
|
493
|
+
*/
|
|
494
|
+
include?: string[];
|
|
495
|
+
/**
|
|
496
|
+
* Ignore and exclude SVG files from optimization.
|
|
497
|
+
*
|
|
498
|
+
* @default [ ]
|
|
499
|
+
*/
|
|
500
|
+
exclude?: string[];
|
|
501
|
+
/**
|
|
502
|
+
* Whether to optimize SVG tags in HTML.
|
|
503
|
+
*
|
|
504
|
+
* @default true
|
|
505
|
+
*/
|
|
506
|
+
optimizeInHtml?: boolean;
|
|
507
|
+
/** SVGO configuration. */
|
|
508
|
+
svgoConfig?: Config;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Optimize SVG files and SVG tags in HTML using `svgo`.
|
|
512
|
+
*
|
|
513
|
+
* For CSS inlined SVGs, use a PostCSS plugin like `cssnano` instead.
|
|
514
|
+
*
|
|
515
|
+
* **Production Only**
|
|
516
|
+
*/
|
|
517
|
+
declare function svgoPlugin(options?: svgoOptions): Plugin;
|
|
518
|
+
//#endregion
|
|
519
|
+
//#region src/plugins/transform-css/transform-css-plugin.d.ts
|
|
520
|
+
interface TransformCssOptions {
|
|
521
|
+
/** Postcss plugins. */
|
|
522
|
+
plugins?: readonly postcss.AcceptedPlugin[];
|
|
523
|
+
/**
|
|
524
|
+
* Whether to load postcss config file.
|
|
525
|
+
*
|
|
526
|
+
* @default false
|
|
527
|
+
*/
|
|
528
|
+
loadConfig?: boolean;
|
|
529
|
+
}
|
|
530
|
+
declare function transformCssPlugin(options?: TransformCssOptions): Plugin;
|
|
531
|
+
//#endregion
|
|
532
|
+
//#region src/plugins/transform-js/transform-js-plugin.d.ts
|
|
533
|
+
interface TransformJsPluginOptions {
|
|
534
|
+
presets?: babel.PluginItem[];
|
|
535
|
+
plugins?: babel.PluginItem[];
|
|
536
|
+
}
|
|
537
|
+
declare function transformJsPlugin(options?: TransformJsPluginOptions): Plugin;
|
|
538
|
+
//#endregion
|
|
539
|
+
//#region src/plugins/web-manifest/web-manifest-plugin.d.ts
|
|
540
|
+
interface WebManifestOptions {
|
|
541
|
+
/**
|
|
542
|
+
* The file path to the manifest file relative to the root directory.
|
|
543
|
+
*
|
|
544
|
+
* @default "./sources/assets/manifest.json"
|
|
545
|
+
*/
|
|
546
|
+
manifestPath?: string;
|
|
547
|
+
/**
|
|
548
|
+
* The output file path relative to the output directory.
|
|
549
|
+
*
|
|
550
|
+
* @default "./manifest.json"
|
|
551
|
+
*/
|
|
552
|
+
outfile?: string;
|
|
553
|
+
}
|
|
554
|
+
declare function webManifestPlugin(options?: WebManifestOptions): Plugin;
|
|
555
|
+
//#endregion
|
|
556
|
+
//#region src/plugins/write-files/write-files-plugin.d.ts
|
|
557
|
+
interface WriteFilesOptions {
|
|
558
|
+
/** Remove the output directory before emitting files. */
|
|
559
|
+
clean?: boolean;
|
|
560
|
+
/**
|
|
561
|
+
* Glob patterns to match files to write.
|
|
562
|
+
*
|
|
563
|
+
* @default ["**\/*"]
|
|
564
|
+
*/
|
|
565
|
+
include?: string[];
|
|
566
|
+
/**
|
|
567
|
+
* Glob patterns to ignore files from writing.
|
|
568
|
+
*
|
|
569
|
+
* @default [ ]
|
|
570
|
+
*/
|
|
571
|
+
exclude?: string[];
|
|
572
|
+
minify?: {
|
|
573
|
+
/**
|
|
574
|
+
* Whether to minify output.
|
|
575
|
+
*
|
|
576
|
+
* @default false
|
|
577
|
+
*/
|
|
578
|
+
enabled?: boolean;
|
|
579
|
+
/**
|
|
580
|
+
* Glob patterns to match files to minify.
|
|
581
|
+
*
|
|
582
|
+
* @default ["**\/*"]
|
|
583
|
+
*/
|
|
584
|
+
include?: string[];
|
|
585
|
+
/**
|
|
586
|
+
* Glob patterns to ignore files from minifying.
|
|
587
|
+
*
|
|
588
|
+
* @default [ ]
|
|
589
|
+
*/
|
|
590
|
+
exclude?: string[];
|
|
591
|
+
};
|
|
592
|
+
format?: {
|
|
593
|
+
/**
|
|
594
|
+
* Whether to format output.
|
|
595
|
+
*
|
|
596
|
+
* @default false
|
|
597
|
+
*/
|
|
598
|
+
enabled?: boolean;
|
|
599
|
+
/**
|
|
600
|
+
* Glob patterns to match files to format.
|
|
601
|
+
*
|
|
602
|
+
* @default ["**\/*"]
|
|
603
|
+
*/
|
|
604
|
+
include?: string[];
|
|
605
|
+
/**
|
|
606
|
+
* Glob patterns to ignore files from formatting.
|
|
607
|
+
*
|
|
608
|
+
* @default [ ]
|
|
609
|
+
*/
|
|
610
|
+
exclude?: string[];
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
declare function writeFilesPlugin(options: WriteFilesOptions): Plugin;
|
|
614
|
+
//#endregion
|
|
615
|
+
//#region src/plugins/html-build-time-script/html-build-time-script.d.ts
|
|
616
|
+
interface HtmlBuildTimeScriptOptions {
|
|
617
|
+
/**
|
|
618
|
+
* The name of the attribute on the script tag that marks it for execution.
|
|
619
|
+
*
|
|
620
|
+
* @default "build-time"
|
|
621
|
+
*/
|
|
622
|
+
buildAttribute?: string;
|
|
623
|
+
/**
|
|
624
|
+
* The name of the attribute on the script tag that enables full DOM context using `jsdom`, otherwise `node-html-parser` is
|
|
625
|
+
* used.
|
|
626
|
+
*
|
|
627
|
+
* @default "full-dom"
|
|
628
|
+
*/
|
|
629
|
+
fullDomAttribute?: string;
|
|
630
|
+
contextAttribute?: string;
|
|
631
|
+
}
|
|
632
|
+
declare function htmlBuildTimeScript(options?: HtmlBuildTimeScriptOptions): Plugin;
|
|
633
|
+
//#endregion
|
|
634
|
+
//#region src/plugins/html-bundle-script/html-bundle-script-plugin.d.ts
|
|
635
|
+
interface HtmlBundleScriptOptions {
|
|
636
|
+
/**
|
|
637
|
+
* Glob patterns for modules that should be treated as external (excluded from bundling).
|
|
638
|
+
*
|
|
639
|
+
* Applied when the `externalsAttribute` is not set on the script tag.
|
|
640
|
+
*
|
|
641
|
+
* @default [ ]
|
|
642
|
+
*/
|
|
643
|
+
externals?: string[];
|
|
644
|
+
/**
|
|
645
|
+
* Glob patterns that exempt modules from being treated as external, even if they match `externals`.
|
|
646
|
+
*
|
|
647
|
+
* Applied when the `externalsExcludeAttribute` is not set on the script tag.
|
|
648
|
+
*
|
|
649
|
+
* @default [ ]
|
|
650
|
+
*/
|
|
651
|
+
externalsExclude?: string[];
|
|
652
|
+
/**
|
|
653
|
+
* The HTML attribute name that enables bundling on a script tag.
|
|
654
|
+
*
|
|
655
|
+
* @default "bundle"
|
|
656
|
+
*/
|
|
657
|
+
bundleAttribute?: string;
|
|
658
|
+
/**
|
|
659
|
+
* The HTML attribute name that specifies the output file path for the bundled script.
|
|
660
|
+
*
|
|
661
|
+
* @default "bundle-out"
|
|
662
|
+
*/
|
|
663
|
+
bundleOutAttribute?: string;
|
|
664
|
+
/**
|
|
665
|
+
* The HTML attribute name that specifies which modules to treat as external.
|
|
666
|
+
*
|
|
667
|
+
* Accepts a semicolon-separated list of glob patterns.
|
|
668
|
+
*
|
|
669
|
+
* @default "bundle-externals"
|
|
670
|
+
*/
|
|
671
|
+
externalsAttribute?: string;
|
|
672
|
+
/**
|
|
673
|
+
* The HTML attribute name that specifies which modules to exempt from being external.
|
|
674
|
+
*
|
|
675
|
+
* Accepts a semicolon-separated list of glob patterns.
|
|
676
|
+
*
|
|
677
|
+
* @default "bundle-externals-exclude"
|
|
678
|
+
*/
|
|
679
|
+
externalsExcludeAttribute?: string;
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* A plugin that bundles `<script>` tags in HTML files using esbuild.
|
|
683
|
+
*
|
|
684
|
+
* Bundling is opt-in per script tag via the `bundle` attribute (configurable via {@link HtmlBundleScriptOptions.bundleAttribute}).
|
|
685
|
+
*
|
|
686
|
+
* **Inlining vs. separate file**
|
|
687
|
+
*
|
|
688
|
+
* - Inline script, no `bundle-out` attribute —> bundled output replaces the tag's content in place.
|
|
689
|
+
* - Inline script, `bundle-out` attribute set —> tag content is cleared and `src` is set to the output file.
|
|
690
|
+
* - `src` script, no `bundle-out` attribute —> bundle is written to `{filename}.bundle.js` and `src` is updated to point to it.
|
|
691
|
+
* - `src` script, `bundle-out` attribute set —> bundle is written to the specified path and `src` is updated to point to it.
|
|
692
|
+
*
|
|
693
|
+
* **Externals resolution**
|
|
694
|
+
*
|
|
695
|
+
* Glob patterns in {@link HtmlBundleScriptOptions.externals} and {@link HtmlBundleScriptOptions.externalsExclude} are matched
|
|
696
|
+
* against each resolved module path. A module is treated as external if it matches `externals` and does not match
|
|
697
|
+
* `externalsExclude`.
|
|
698
|
+
*/
|
|
699
|
+
declare function htmlBundleScriptPlugin(options?: HtmlBundleScriptOptions): Plugin;
|
|
700
|
+
//#endregion
|
|
701
|
+
//#region src/plugins/html-bundle-style/html-bundle-style-plugin.d.ts
|
|
702
|
+
interface HtmlBundleStyleOptions {
|
|
703
|
+
/**
|
|
704
|
+
* The HTML attribute name that enables bundling on a link[stylesheet] or style tag.
|
|
705
|
+
*
|
|
706
|
+
* @default "bundle"
|
|
707
|
+
*/
|
|
708
|
+
bundleAttribute?: string;
|
|
709
|
+
}
|
|
710
|
+
declare function htmlBundleStylePlugin(options?: HtmlBundleStyleOptions): Plugin;
|
|
711
|
+
//#endregion
|
|
712
|
+
//#region src/plugins/html-fragment/html-fragment-plugin.d.ts
|
|
713
|
+
interface HtmlFragmentOptions {
|
|
714
|
+
/**
|
|
715
|
+
* The tag name used for the fragment custom element.
|
|
716
|
+
*
|
|
717
|
+
* @default "fragment"
|
|
718
|
+
*/
|
|
719
|
+
tagName?: string;
|
|
720
|
+
}
|
|
721
|
+
declare function htmlFragmentPlugin(options?: HtmlFragmentOptions): Plugin;
|
|
722
|
+
//#endregion
|
|
723
|
+
//#region src/plugins/html-iife-script/html-iife-script-plugin.d.ts
|
|
724
|
+
interface HtmlIifeScriptOptions {
|
|
725
|
+
/**
|
|
726
|
+
* The attribute name that enables IIFE.
|
|
727
|
+
*
|
|
728
|
+
* @default "iife"
|
|
729
|
+
*/
|
|
730
|
+
iifeAttribute?: string;
|
|
731
|
+
}
|
|
732
|
+
declare function htmlIifeScriptPlugin(options?: HtmlIifeScriptOptions): Plugin;
|
|
733
|
+
//#endregion
|
|
734
|
+
//#region src/plugins/html-inline-script/html-inline-script-plugin.d.ts
|
|
735
|
+
interface HtmlInlineScriptOptions {
|
|
736
|
+
/**
|
|
737
|
+
* The attribute name that enables inlining.
|
|
738
|
+
*
|
|
739
|
+
* @default "inline"
|
|
740
|
+
*/
|
|
741
|
+
inlineAttribute?: string;
|
|
742
|
+
}
|
|
743
|
+
declare function htmlInlineScriptPlugin(options?: HtmlInlineScriptOptions): Plugin;
|
|
744
|
+
//#endregion
|
|
745
|
+
//#region src/plugins/html-inline-style/html-inline-style-plugin.d.ts
|
|
746
|
+
interface HtmlInlineStyleOptions {
|
|
747
|
+
/**
|
|
748
|
+
* The attribute name that enables inlining.
|
|
749
|
+
*
|
|
750
|
+
* @default "inline"
|
|
751
|
+
*/
|
|
752
|
+
inlineAttribute?: string;
|
|
753
|
+
}
|
|
754
|
+
declare function htmlInlineStylePlugin(options?: HtmlInlineStyleOptions): Plugin;
|
|
755
|
+
//#endregion
|
|
756
|
+
//#region src/plugins/html-inline-svg/html-inline-svg-plugin.d.ts
|
|
757
|
+
interface HtmlInlineSvgOptions {
|
|
758
|
+
/**
|
|
759
|
+
* The attribute name that enables inlining.
|
|
760
|
+
*
|
|
761
|
+
* @default "inline"
|
|
762
|
+
*/
|
|
763
|
+
inlineAttribute?: string;
|
|
764
|
+
}
|
|
765
|
+
declare function HtmlInlineSvgPlugin(options?: HtmlInlineSvgOptions): Plugin;
|
|
766
|
+
//#endregion
|
|
767
|
+
//#region src/plugins/html-inline-text/html-inline-text-plugin.d.ts
|
|
768
|
+
interface HtmlInlineTextOptions {
|
|
769
|
+
/**
|
|
770
|
+
* The tag name for the inline text.
|
|
771
|
+
*
|
|
772
|
+
* @default "inline-text"
|
|
773
|
+
*/
|
|
774
|
+
tagName?: string;
|
|
775
|
+
/**
|
|
776
|
+
* The attribute name on the custom tag that holds the path to the external text file.
|
|
777
|
+
*
|
|
778
|
+
* @default "src"
|
|
779
|
+
*/
|
|
780
|
+
sourceAttribute?: string;
|
|
781
|
+
/**
|
|
782
|
+
* The attribute name of the attribute that disables HTML escaping.
|
|
783
|
+
*
|
|
784
|
+
* @default "no-escape"
|
|
785
|
+
*/
|
|
786
|
+
noEscapeAttribute?: string;
|
|
787
|
+
}
|
|
788
|
+
declare function htmlInlineTextPlugin(options?: HtmlInlineTextOptions): Plugin;
|
|
789
|
+
//#endregion
|
|
790
|
+
//#region src/plugins/html-insert/html-insert-plugin.d.ts
|
|
791
|
+
interface HtmlInsertOptions {
|
|
792
|
+
/**
|
|
793
|
+
* The HTML tag name of the custom insert element.
|
|
794
|
+
*
|
|
795
|
+
* @default "insert"
|
|
796
|
+
*/
|
|
797
|
+
tagName?: string;
|
|
798
|
+
/**
|
|
799
|
+
* The attribute name that points to the target element via a CSS selector.
|
|
800
|
+
*
|
|
801
|
+
* @default "selector"
|
|
802
|
+
*/
|
|
803
|
+
selectorAttribute?: string;
|
|
804
|
+
/**
|
|
805
|
+
* The attribute name that enables the replacement of the target element.
|
|
806
|
+
*
|
|
807
|
+
* @default "replace"
|
|
808
|
+
*/
|
|
809
|
+
replaceAttribute?: string;
|
|
810
|
+
/**
|
|
811
|
+
* The attribute name that determines the position of the inserted element.
|
|
812
|
+
*
|
|
813
|
+
* @default "where"
|
|
814
|
+
*/
|
|
815
|
+
whereAttribute?: string;
|
|
816
|
+
}
|
|
817
|
+
declare function htmlInsertPlugin(options?: HtmlInsertOptions): Plugin;
|
|
818
|
+
//#endregion
|
|
819
|
+
//#region src/plugins/html-layout/html-layout-plugin.d.ts
|
|
820
|
+
interface HtmlLayoutOptions {
|
|
821
|
+
/**
|
|
822
|
+
* Tag names registered as valid HTML elements. Each name is also the required file suffix — e.g. `"layout"` means files must
|
|
823
|
+
* end in `.layout.html`, `"part"` means `.part.html`.
|
|
824
|
+
*
|
|
825
|
+
* @default ["layout", "part"]
|
|
826
|
+
*/
|
|
827
|
+
tags?: string[];
|
|
828
|
+
/**
|
|
829
|
+
* Attribute name used to point to the layout or part file.
|
|
830
|
+
*
|
|
831
|
+
* @default "src"
|
|
832
|
+
*/
|
|
833
|
+
layoutSourceAttribute?: string;
|
|
834
|
+
/**
|
|
835
|
+
* Attribute name used to point to an external JSON file whose properties are merged into `$data`. Inline attributes take
|
|
836
|
+
* priority over file keys.
|
|
837
|
+
*
|
|
838
|
+
* @default "dataSource"
|
|
839
|
+
*/
|
|
840
|
+
dataSourceAttribute?: string;
|
|
841
|
+
/**
|
|
842
|
+
* Attribute name used to pass an inline JSON string as data. The value is parsed and merged into `$data` alongside any inline
|
|
843
|
+
* attributes and any keys loaded via `dataSource`. Inline attributes take priority over `dataJson` keys; `dataJson` keys take
|
|
844
|
+
* priority over `dataSource` keys.
|
|
845
|
+
*
|
|
846
|
+
* @default "data"
|
|
847
|
+
*/
|
|
848
|
+
dataJsonAttribute?: string;
|
|
849
|
+
/**
|
|
850
|
+
* Attribute name that opts a `<script>`, `<style>`, or `<link rel="stylesheet">` tag out of deduplication. By default,
|
|
851
|
+
* duplicate scripts and styles are removed when a layout or part is used more than once on the same page. Marking a tag with
|
|
852
|
+
* this boolean attribute forces it to be emitted once per instance.
|
|
853
|
+
*
|
|
854
|
+
* @default "always-include"
|
|
855
|
+
*/
|
|
856
|
+
alwaysIncludeAttribute?: string;
|
|
857
|
+
/**
|
|
858
|
+
* Prefix for conditionally adding boolean attributes. Append the target attribute name as a suffix — `add-attr-open`,
|
|
859
|
+
* `add-attr-disabled`, etc. The value is a JS expression evaluated after placeholder resolution; if it is non-empty and not
|
|
860
|
+
* `"false"`, the named attribute is added to the element. Multiple `add-attr-*` attributes can appear on the same element.
|
|
861
|
+
*
|
|
862
|
+
* ```html
|
|
863
|
+
* <details add-attr-open="{{ $data.open }}">…</details>
|
|
864
|
+
* ```
|
|
865
|
+
*
|
|
866
|
+
* @default "add-attr"
|
|
867
|
+
*/
|
|
868
|
+
addAttributeAttribute?: string;
|
|
869
|
+
/**
|
|
870
|
+
* Prefix for conditionally removing boolean attributes. Append the target attribute name as a suffix — `remove-attr-disabled`,
|
|
871
|
+
* `remove-attr-hidden`, etc. The value is a JS expression evaluated after placeholder resolution; if it is non-empty and not
|
|
872
|
+
* `"false"`, the named attribute is removed from the element. Multiple `remove-attr-*` attributes can appear on the same
|
|
873
|
+
* element.
|
|
874
|
+
*
|
|
875
|
+
* ```html
|
|
876
|
+
* <button disabled remove-attr-disabled="{{ $data.enabled }}">…</button>
|
|
877
|
+
* ```
|
|
878
|
+
*
|
|
879
|
+
* @default "remove-attr"
|
|
880
|
+
*/
|
|
881
|
+
removeAttributeAttribute?: string;
|
|
882
|
+
}
|
|
883
|
+
declare function htmlLayoutPlugin(options?: HtmlLayoutOptions): Plugin;
|
|
884
|
+
//#endregion
|
|
885
|
+
//#region src/plugins/html-markdown/html-markdown-plugin.d.ts
|
|
886
|
+
interface HtmlMarkdownOptions {
|
|
887
|
+
/**
|
|
888
|
+
* The attribute that when present on a tag will render the content as markdown.
|
|
889
|
+
*
|
|
890
|
+
* @default "markdown"
|
|
891
|
+
*/
|
|
892
|
+
markdownAttribute?: string;
|
|
893
|
+
/**
|
|
894
|
+
* The tag name of the element that can reference a markdown file.
|
|
895
|
+
*
|
|
896
|
+
* @default "markdown"
|
|
897
|
+
*/
|
|
898
|
+
tag?: string;
|
|
899
|
+
/**
|
|
900
|
+
* The attribute that when present on a tag will render the content as markdown.
|
|
901
|
+
*
|
|
902
|
+
* @default "src"
|
|
903
|
+
*/
|
|
904
|
+
sourceAttribute?: string;
|
|
905
|
+
}
|
|
906
|
+
declare function htmlMarkdownPlugin(options?: HtmlMarkdownOptions): Plugin;
|
|
907
|
+
//#endregion
|
|
908
|
+
//#region src/plugins/html-merge-styles/html-merge-styles-plugin.d.ts
|
|
909
|
+
declare function htmlMergeStylesPlugin(): Plugin;
|
|
910
|
+
//#endregion
|
|
911
|
+
//#region src/plugins/html-pages/html-pages-plugin.d.ts
|
|
912
|
+
interface HtmlPagesOptions {
|
|
913
|
+
/**
|
|
914
|
+
* Pages directory relative to the root.
|
|
915
|
+
*
|
|
916
|
+
* @default ["pages"]
|
|
917
|
+
*/
|
|
918
|
+
pagesDir?: string;
|
|
919
|
+
/**
|
|
920
|
+
* Where to output the HTML pages relative to the output directory.
|
|
921
|
+
*
|
|
922
|
+
* @default "./"
|
|
923
|
+
*/
|
|
924
|
+
outputDir?: string;
|
|
925
|
+
}
|
|
926
|
+
declare function htmlPagesPlugin(options?: HtmlPagesOptions): Plugin;
|
|
927
|
+
//#endregion
|
|
928
|
+
//#region src/plugins/html-preload/html-preload-plugin.d.ts
|
|
929
|
+
interface HtmlPreloadOptions {
|
|
930
|
+
/**
|
|
931
|
+
* Attribute name that enables preloading.
|
|
932
|
+
*
|
|
933
|
+
* @default "preload"
|
|
934
|
+
*/
|
|
935
|
+
preloadAttribute?: string;
|
|
936
|
+
/**
|
|
937
|
+
* Attribute name for including files.
|
|
938
|
+
*
|
|
939
|
+
* @default "include"
|
|
940
|
+
*/
|
|
941
|
+
includeAttribute?: string;
|
|
942
|
+
/**
|
|
943
|
+
* Attribute name for excluding files.
|
|
944
|
+
*
|
|
945
|
+
* @default "exclude"
|
|
946
|
+
*/
|
|
947
|
+
excludeAttribute?: string;
|
|
948
|
+
}
|
|
949
|
+
declare function htmlPreloadPlugin(options?: HtmlPreloadOptions): Plugin;
|
|
950
|
+
//#endregion
|
|
951
|
+
//#region src/plugins/core-plugins/html-metadata/html-metadata-plugin.d.ts
|
|
952
|
+
interface CoreHtmlPluginOptions {
|
|
953
|
+
/**
|
|
954
|
+
* The attribute name to use for minifying script and style tags.
|
|
955
|
+
*
|
|
956
|
+
* @default "minify"
|
|
957
|
+
*/
|
|
958
|
+
minifyAttribute?: string;
|
|
959
|
+
}
|
|
960
|
+
declare function coreHtmlPlugin(options?: CoreHtmlPluginOptions): Plugin;
|
|
961
|
+
//#endregion
|
|
962
|
+
//#region src/plugins/core-plugins/markdown-metadata/markdown-metadata-plugin.d.ts
|
|
963
|
+
interface CoreMarkdownPluginOptions {
|
|
964
|
+
/**
|
|
965
|
+
* Remark plugins.
|
|
966
|
+
*
|
|
967
|
+
* **Default**:
|
|
968
|
+
*
|
|
969
|
+
* 1. `remark-frontmatter`
|
|
970
|
+
* 2. `remark-gfm`
|
|
971
|
+
* 3. `remark-smartypants`
|
|
972
|
+
*/
|
|
973
|
+
remarkPlugins?: Pluggable[];
|
|
974
|
+
/**
|
|
975
|
+
* Rehype plugins.
|
|
976
|
+
*
|
|
977
|
+
* **Default**:
|
|
978
|
+
*
|
|
979
|
+
* 1. `remark-rehype`
|
|
980
|
+
* 2. `rehype-slug`
|
|
981
|
+
* 3. `rehype-autolink-headings`
|
|
982
|
+
* 4. `rehype-external-links`
|
|
983
|
+
* 5. `rehype-stringify`
|
|
984
|
+
*/
|
|
985
|
+
rehypePlugins?: Pluggable[];
|
|
986
|
+
/**
|
|
987
|
+
* Whether to allow HTML in markdown.
|
|
988
|
+
*
|
|
989
|
+
* @default false
|
|
990
|
+
*/
|
|
991
|
+
allowDangerousHtml?: boolean;
|
|
992
|
+
}
|
|
993
|
+
declare function coreMarkdownPlugin(options?: CoreMarkdownPluginOptions): Plugin;
|
|
994
|
+
//#endregion
|
|
995
|
+
//#region src/plugins/core-plugins/script-metadata/script-metadata-plugin.d.ts
|
|
996
|
+
declare function coreScriptPlugin(): Plugin;
|
|
997
|
+
//#endregion
|
|
998
|
+
//#region src/plugins/core-plugins/style-metadata/style-metadata-plugin.d.ts
|
|
999
|
+
declare function coreStylePlugin(): Plugin;
|
|
1000
|
+
//#endregion
|
|
1001
|
+
//#region src/plugins/core-plugins/svg-metadata/svg-metadata-plugin.d.ts
|
|
1002
|
+
declare function coreSvgPlugin(): Plugin;
|
|
1003
|
+
//#endregion
|
|
1004
|
+
//#region src/plugins/core-plugins/web-manifest-metadata/web-manifest-metadata-plugin.d.ts
|
|
1005
|
+
declare function coreWebManifestPlugin(): Plugin;
|
|
1006
|
+
//#endregion
|
|
1007
|
+
//#region src/plugins/core-plugins/development-server/development-server-plugin.d.ts
|
|
1008
|
+
interface DevelopmentServerOptions {
|
|
1009
|
+
/**
|
|
1010
|
+
* The dev server host.
|
|
1011
|
+
*
|
|
1012
|
+
* @default 0.0.0.0
|
|
1013
|
+
*/
|
|
1014
|
+
host?: string;
|
|
1015
|
+
/**
|
|
1016
|
+
* The dev server port.
|
|
1017
|
+
*
|
|
1018
|
+
* @default 3000
|
|
1019
|
+
*/
|
|
1020
|
+
port?: number;
|
|
1021
|
+
/**
|
|
1022
|
+
* Entry url pathname when opening the browser.
|
|
1023
|
+
*
|
|
1024
|
+
* @default /
|
|
1025
|
+
*/
|
|
1026
|
+
entry?: string;
|
|
1027
|
+
}
|
|
1028
|
+
declare function developmentServerPlugin(options?: DevelopmentServerOptions): Plugin;
|
|
1029
|
+
//#endregion
|
|
1030
|
+
//#region src/plugins/cli-plugins/build/build-cli-plugin.d.ts
|
|
1031
|
+
interface BuildCliPluginOptions {
|
|
1032
|
+
/**
|
|
1033
|
+
* Build command name.
|
|
1034
|
+
*
|
|
1035
|
+
* @default "build"
|
|
1036
|
+
*/
|
|
1037
|
+
command?: string;
|
|
1038
|
+
/**
|
|
1039
|
+
* Build command aliases.
|
|
1040
|
+
*
|
|
1041
|
+
* @default ["b"]
|
|
1042
|
+
*/
|
|
1043
|
+
aliases?: string[];
|
|
1044
|
+
}
|
|
1045
|
+
declare function buildCliPlugin(options?: BuildCliPluginOptions): Plugin;
|
|
1046
|
+
//#endregion
|
|
1047
|
+
//#region src/plugins/cli-plugins/convert-fonts/convert-fonts-cli-plugin.d.ts
|
|
1048
|
+
interface ConvertFontsCliPluginOptions {
|
|
1049
|
+
/**
|
|
1050
|
+
* The name of the command.
|
|
1051
|
+
*
|
|
1052
|
+
* @default "convert-fonts"
|
|
1053
|
+
*/
|
|
1054
|
+
command?: string;
|
|
1055
|
+
/**
|
|
1056
|
+
* The aliases of the command.
|
|
1057
|
+
*
|
|
1058
|
+
* @default ["woff2"]
|
|
1059
|
+
*/
|
|
1060
|
+
aliases?: string[];
|
|
1061
|
+
/**
|
|
1062
|
+
* The default value of the `--fonts` option.
|
|
1063
|
+
*
|
|
1064
|
+
* A glob pattern to match font files.
|
|
1065
|
+
*/
|
|
1066
|
+
fonts?: string;
|
|
1067
|
+
/**
|
|
1068
|
+
* The default value of the `--exclude` option.
|
|
1069
|
+
*
|
|
1070
|
+
* A glob patterns to exclude input files.
|
|
1071
|
+
*/
|
|
1072
|
+
exclude?: string;
|
|
1073
|
+
/**
|
|
1074
|
+
* The default value of the `--out-dir` option.
|
|
1075
|
+
*
|
|
1076
|
+
* Where to save the output files.
|
|
1077
|
+
*/
|
|
1078
|
+
outDir?: string;
|
|
1079
|
+
}
|
|
1080
|
+
declare function convertFontsCliPlugin(options?: ConvertFontsCliPluginOptions): Plugin;
|
|
1081
|
+
//#endregion
|
|
1082
|
+
//#region src/plugins/cli-plugins/generate-font-face/generate-font-face-cli-plugin.d.ts
|
|
1083
|
+
interface GenerateFontFacesCliPluginOptions {
|
|
1084
|
+
/**
|
|
1085
|
+
* The name of the command.
|
|
1086
|
+
*
|
|
1087
|
+
* @default "fontface"
|
|
1088
|
+
*/
|
|
1089
|
+
command?: string;
|
|
1090
|
+
/**
|
|
1091
|
+
* The aliases of the command.
|
|
1092
|
+
*
|
|
1093
|
+
* @default ["font"]
|
|
1094
|
+
*/
|
|
1095
|
+
aliases?: string[];
|
|
1096
|
+
/**
|
|
1097
|
+
* The default value of the `fonts` option.
|
|
1098
|
+
*
|
|
1099
|
+
* A glob pattern to match font files.
|
|
1100
|
+
*/
|
|
1101
|
+
fonts?: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* The default value of the `exclude` option.
|
|
1104
|
+
*
|
|
1105
|
+
* A glob patterns to exclude input files.
|
|
1106
|
+
*/
|
|
1107
|
+
exclude?: string;
|
|
1108
|
+
/**
|
|
1109
|
+
* The default value of the `cssOut` option.
|
|
1110
|
+
*
|
|
1111
|
+
* Where to save the output CSS file.
|
|
1112
|
+
*/
|
|
1113
|
+
cssOut?: string;
|
|
1114
|
+
/**
|
|
1115
|
+
* The default value of the `fontDisplay` option.
|
|
1116
|
+
*
|
|
1117
|
+
* @default "auto"
|
|
1118
|
+
*/
|
|
1119
|
+
fontDisplay?: "auto" | "block" | "swap" | "fallback" | "optional";
|
|
1120
|
+
}
|
|
1121
|
+
declare function generateFontFacesCliPlugin(options?: GenerateFontFacesCliPluginOptions): Plugin;
|
|
1122
|
+
//#endregion
|
|
1123
|
+
//#region src/plugins/cli-plugins/material-you/material-you/types.d.ts
|
|
1124
|
+
type GenerationStyle = "SPRITZ" | "TONAL_SPOT" | "VIBRANT" | "EXPRESSIVE" | "RAINBOW" | "FRUIT_SALAD" | "CONTENT" | "MONOCHROMATIC";
|
|
1125
|
+
//#endregion
|
|
1126
|
+
//#region src/plugins/cli-plugins/material-you/material-you-cli-plugin.d.ts
|
|
1127
|
+
interface MaterialYouCliPluginOptions {
|
|
1128
|
+
/**
|
|
1129
|
+
* Build command name.
|
|
1130
|
+
*
|
|
1131
|
+
* @default "palette"
|
|
1132
|
+
*/
|
|
1133
|
+
command?: string;
|
|
1134
|
+
/**
|
|
1135
|
+
* Build command aliases.
|
|
1136
|
+
*
|
|
1137
|
+
* @default ["material-you"]
|
|
1138
|
+
*/
|
|
1139
|
+
aliases?: string[];
|
|
1140
|
+
/** The default value for the `--color` option. */
|
|
1141
|
+
color?: string;
|
|
1142
|
+
/**
|
|
1143
|
+
* The default value for the `--style` option.
|
|
1144
|
+
*
|
|
1145
|
+
* @default "TONAL_SPOT"
|
|
1146
|
+
*/
|
|
1147
|
+
style?: GenerationStyle;
|
|
1148
|
+
/**
|
|
1149
|
+
* The default value for the `--format` option.
|
|
1150
|
+
*
|
|
1151
|
+
* @default "css"
|
|
1152
|
+
*/
|
|
1153
|
+
format?: "css" | "json";
|
|
1154
|
+
/**
|
|
1155
|
+
* The default value for the `--raw` option.
|
|
1156
|
+
*
|
|
1157
|
+
* @default false
|
|
1158
|
+
*/
|
|
1159
|
+
raw?: boolean;
|
|
1160
|
+
}
|
|
1161
|
+
declare function materialYouCliPlugin(options?: MaterialYouCliPluginOptions): Plugin;
|
|
1162
|
+
//#endregion
|
|
1163
|
+
//#region src/plugins/cli-plugins/serve/serve-cli-plugin.d.ts
|
|
1164
|
+
interface ServeCliPluginOptions {
|
|
1165
|
+
/**
|
|
1166
|
+
* Serve command name.
|
|
1167
|
+
*
|
|
1168
|
+
* @default "serve"
|
|
1169
|
+
*/
|
|
1170
|
+
command?: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* Serve command aliases.
|
|
1173
|
+
*
|
|
1174
|
+
* @default ["dev"]
|
|
1175
|
+
*/
|
|
1176
|
+
aliases?: string[];
|
|
1177
|
+
}
|
|
1178
|
+
declare function serveCliPlugin(options?: ServeCliPluginOptions): Plugin;
|
|
1179
|
+
//#endregion
|
|
1180
|
+
export { AnalyzeOutputOptions, BuildCliPluginOptions, BundlePackagesOptions, ConvertFontsCliPluginOptions, ConvertImageOptions, CopyAssetsOptions, CoreHtmlPluginOptions, CoreMarkdownPluginOptions, type CssLinear, CustomEasePluginOptions, DevelopmentServerOptions, GenerateFontFacesCliPluginOptions, HtmlBuildTimeScriptOptions, HtmlBundleScriptOptions, HtmlBundleStyleOptions, HtmlFragmentOptions, HtmlIifeScriptOptions, HtmlInlineScriptOptions, HtmlInlineStyleOptions, HtmlInlineSvgOptions, HtmlInlineSvgPlugin, HtmlInlineTextOptions, HtmlInsertOptions, HtmlLayoutOptions, HtmlMarkdownOptions, HtmlPagesOptions, HtmlPreloadOptions, I18nPluginOptions, ImageFormat, ImagePreset, type ImportAsStringOptions, LoadSourcesPluginOptions, MaterialYouCliPluginOptions, RobotsTextOptions, ServeCliPluginOptions, ServiceWorkerOptions, SitemapOptions, TransformCssOptions, TransformJsPluginOptions, WebManifestOptions, WriteFilesOptions, analyzeOutputPlugin, buildCliPlugin, bundlePackagesPlugin, convertFontsCliPlugin, convertImagePlugin, copyAssetsPlugin, coreHtmlPlugin, coreMarkdownPlugin, coreScriptPlugin, coreStylePlugin, coreSvgPlugin, coreWebManifestPlugin, customEasePlugin, developmentServerPlugin, generateFontFacesCliPlugin, htmlBuildTimeScript, htmlBundleScriptPlugin, htmlBundleStylePlugin, htmlFragmentPlugin, htmlIifeScriptPlugin, htmlInlineScriptPlugin, htmlInlineStylePlugin, htmlInlineTextPlugin, htmlInsertPlugin, htmlLayoutPlugin, htmlMarkdownPlugin, htmlMergeStylesPlugin, htmlPagesPlugin, htmlPreloadPlugin, svgoPlugin as htmlSvgoPlugin, svgoPlugin, i18nPlugin, importAsStringPlugin, type import_as_string, loadSourcesPlugin, materialYouCliPlugin, robotsTextPlugin, serveCliPlugin, serviceWorkerPlugin, sitemapPlugin, svgoOptions, transformCssPlugin, transformJsPlugin, webManifestPlugin, writeFilesPlugin };
|
|
1181
|
+
//# sourceMappingURL=index.d.mts.map
|