-
Notifications
You must be signed in to change notification settings - Fork 3
/
options.d.ts
35 lines (33 loc) · 1.38 KB
/
options.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
export interface IPluginOptions {
/**
* Determines whether the processed images should be returned as `Image` DOM elements.
* If set to true, the plugin will convert the image data into `Image` elements that can be directly used in the DOM.
* This is useful when you need to manipulate or display images dynamically on the web page.
*
* @type {boolean}
* @default false
*/
dom?: boolean;
/**
* Specifies an array of regex patterns to include specific image files for the plugin to process.
* Each string in the array should be a valid regular expression used to match file paths.
* This option is used to target images in specific directories or with certain file names that need processing.
*
* @example
* ["assets/images/.*\\.(jpg|png)$"] // Includes all jpg and png images in 'assets/images' directory
*
* @type {string[]}
*/
include?: string[];
/**
* Specifies an array of regex patterns to exclude specific image files from the plugin processing.
* Each string in the array should be a valid regular expression used to match file paths.
* Use this to avoid processing images in certain directories or with specific characteristics.
*
* @example
* ["assets/images/.*\\-thumbnail\\.(jpg|png)$"] // Excludes all thumbnail jpg and png images in 'assets/images' directory
*
* @type {string[]}
*/
exclude?: string[];
}