-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtypes.ts
More file actions
77 lines (66 loc) · 1.72 KB
/
types.ts
File metadata and controls
77 lines (66 loc) · 1.72 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import type { FilterPattern } from '@veno-ui/utils'
import type { IconifyLoaderOptions } from '@iconify/utils/lib/loader/types'
import type { Config } from 'svgo'
import type { PresetName } from './presets'
export type ComponentProps = { component: string, props: string[] }
export interface Options
{
/**
* @zh 引入文件的过滤模式
* @en RegExp or glob to match files to be transformed
*
* @default [/\.vue$/, /\.vue\?vue/]
*/
include?: FilterPattern
/**
* @zh 排除文件的过滤模式
* @en RegExp or glob to match files to NOT be transformed
*
* @default [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/]
*/
exclude?: FilterPattern
/**
* @zh 识别传入组件的属性值替换成图标组件
*/
replaceableProps?: (ComponentProps | PresetName)[],
/**
* @zh 用于搜索图标的相对目录路径
* @en Relative paths to the directory to search for icons
*
* @default 'src/icons'
*/
dirs?: string | string[]
/**
* @zh 图标的有效文件扩展名
* @en Valid file extensions for icons
*
* @default ['svg']
*/
extensions?: string | string[]
/**
* @zh 搜索子目录
* @en Search for subdirectories
*
* @default true
*/
deep?: boolean
/**
* @zh 传递给 Iconify Loader 的选项
* @en Options passed to Iconify Loader
*/
iconifyLoaderOptions?: IconifyLoaderOptions
/**
* @zh 传递给 svgo 的选项
* @en Options passed to svgo
*
* @default { plugins: ['preset-default', 'removeViewBox', 'removeDimensions'] }
*/
svgoOptions?: Config
}
export interface ResolvedOptions extends Required<Options>
{
replaceableProps: ComponentProps[],
root: string
resolvedDirs: string[]
globs: string[]
}