@meng-xi/vite-plugin 0.0.1 → 0.0.3
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/README-en.md +150 -0
- package/README.md +84 -138
- package/dist/common/index.cjs +1 -0
- package/dist/common/index.d.cts +109 -0
- package/dist/common/index.d.mts +109 -0
- package/dist/common/index.d.ts +109 -0
- package/dist/common/index.mjs +1 -0
- package/dist/factory/index.cjs +1 -0
- package/dist/factory/index.d.cts +260 -0
- package/dist/factory/index.d.mts +260 -0
- package/dist/factory/index.d.ts +260 -0
- package/dist/factory/index.mjs +1 -0
- package/dist/index.cjs +1 -3
- package/dist/index.d.cts +7 -282
- package/dist/index.d.mts +7 -282
- package/dist/index.d.ts +7 -282
- package/dist/index.mjs +1 -3
- package/dist/logger/index.cjs +1 -0
- package/dist/logger/index.d.cts +1 -0
- package/dist/logger/index.d.mts +1 -0
- package/dist/logger/index.d.ts +1 -0
- package/dist/logger/index.mjs +1 -0
- package/dist/plugins/index.cjs +1 -0
- package/dist/plugins/index.d.cts +210 -0
- package/dist/plugins/index.d.mts +210 -0
- package/dist/plugins/index.d.ts +210 -0
- package/dist/plugins/index.mjs +1 -0
- package/dist/shared/vite-plugin.B3PARlU9.d.cts +119 -0
- package/dist/shared/vite-plugin.B3PARlU9.d.mts +119 -0
- package/dist/shared/vite-plugin.B3PARlU9.d.ts +119 -0
- package/dist/shared/vite-plugin.BT1oHRKK.cjs +1 -0
- package/dist/shared/vite-plugin.BTKhc7n7.cjs +3 -0
- package/dist/shared/vite-plugin.BZqhBDYR.mjs +1 -0
- package/dist/shared/vite-plugin.Bn8mcCzy.cjs +3 -0
- package/dist/shared/vite-plugin.CY2ydccp.mjs +3 -0
- package/dist/shared/vite-plugin.CiHfwMiN.d.cts +91 -0
- package/dist/shared/vite-plugin.CiHfwMiN.d.mts +91 -0
- package/dist/shared/vite-plugin.CiHfwMiN.d.ts +91 -0
- package/dist/shared/vite-plugin.ClHiVXD6.mjs +1 -0
- package/dist/shared/vite-plugin.DSRKYuae.mjs +3 -0
- package/dist/shared/vite-plugin.DrSzERYS.cjs +1 -0
- package/dist/shared/vite-plugin.UkE7CdSe.d.cts +43 -0
- package/dist/shared/vite-plugin.UkE7CdSe.d.mts +43 -0
- package/dist/shared/vite-plugin.UkE7CdSe.d.ts +43 -0
- package/package.json +72 -57
- package/dist/plugins/copyFile/index.d.ts +0 -44
- package/dist/plugins/copyFile/index.mjs +0 -43
- package/dist/plugins/copyFile/type.d.ts +0 -47
- package/dist/plugins/copyFile/type.mjs +0 -0
- package/dist/plugins/injectIco/index.d.ts +0 -74
- package/dist/plugins/injectIco/index.mjs +0 -82
- package/dist/plugins/injectIco/type.d.ts +0 -115
- package/dist/plugins/injectIco/type.mjs +0 -0
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 图标配置项接口
|
|
3
|
-
*
|
|
4
|
-
* @interface Icon
|
|
5
|
-
*/
|
|
6
|
-
interface Icon {
|
|
7
|
-
/**
|
|
8
|
-
* 图标关系类型
|
|
9
|
-
*/
|
|
10
|
-
rel: string;
|
|
11
|
-
/**
|
|
12
|
-
* 图标 URL
|
|
13
|
-
*/
|
|
14
|
-
href: string;
|
|
15
|
-
/**
|
|
16
|
-
* 图标尺寸
|
|
17
|
-
*/
|
|
18
|
-
sizes?: string;
|
|
19
|
-
/**
|
|
20
|
-
* 图标 MIME 类型
|
|
21
|
-
*/
|
|
22
|
-
type?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* 图标文件复制配置选项接口
|
|
26
|
-
*
|
|
27
|
-
* @interface CopyOptions
|
|
28
|
-
*/
|
|
29
|
-
interface CopyOptions {
|
|
30
|
-
/**
|
|
31
|
-
* 图标源文件目录,用于复制图标到打包目录
|
|
32
|
-
*
|
|
33
|
-
* @example 'src/assets/icons'
|
|
34
|
-
*/
|
|
35
|
-
sourceDir: string;
|
|
36
|
-
/**
|
|
37
|
-
* 图标目标目录(打包目录),用于复制图标到打包目录
|
|
38
|
-
*
|
|
39
|
-
* @example 'dist/assets/icons'
|
|
40
|
-
*/
|
|
41
|
-
targetDir: string;
|
|
42
|
-
/**
|
|
43
|
-
* 是否覆盖同名文件
|
|
44
|
-
*
|
|
45
|
-
* @defaultValue true
|
|
46
|
-
* @example false
|
|
47
|
-
*/
|
|
48
|
-
overwrite?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* 是否支持递归复制
|
|
51
|
-
*
|
|
52
|
-
* @defaultValue true
|
|
53
|
-
* @example false
|
|
54
|
-
*/
|
|
55
|
-
recursive?: boolean;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* 注入网站图标链接的配置选项接口
|
|
59
|
-
*
|
|
60
|
-
* @interface InjectIcoOptions
|
|
61
|
-
*/
|
|
62
|
-
export interface InjectIcoOptions {
|
|
63
|
-
/**
|
|
64
|
-
* 图标文件的基础路径,默认为根路径 `/`
|
|
65
|
-
*
|
|
66
|
-
* @defaultValue `/`
|
|
67
|
-
* @example '/assets'
|
|
68
|
-
*/
|
|
69
|
-
base?: string;
|
|
70
|
-
/**
|
|
71
|
-
* 图标的完整 URL,如果提供则优先使用(覆盖 base + favicon.ico)
|
|
72
|
-
*
|
|
73
|
-
* @example 'https://example.com/favicon.ico'
|
|
74
|
-
*/
|
|
75
|
-
url?: string;
|
|
76
|
-
/**
|
|
77
|
-
* 自定义的完整 link 标签 HTML,如果提供则优先使用(覆盖 url 和 base)
|
|
78
|
-
*
|
|
79
|
-
* @example '<link rel="icon" href="/favicon.svg" type="image/svg+xml" />'
|
|
80
|
-
*/
|
|
81
|
-
link?: string;
|
|
82
|
-
/**
|
|
83
|
-
* 自定义图标数组,支持多种图标格式和尺寸
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
* [
|
|
87
|
-
* { rel: 'icon', href: '/favicon.svg', type: 'image/svg+xml' },
|
|
88
|
-
* { rel: 'icon', href: '/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
|
|
89
|
-
* { rel: 'icon', href: '/favicon-16x16.png', sizes: '16x16', type: 'image/png' }
|
|
90
|
-
* ]
|
|
91
|
-
*/
|
|
92
|
-
icons?: Icon[];
|
|
93
|
-
/**
|
|
94
|
-
* 是否显示详细日志
|
|
95
|
-
*
|
|
96
|
-
* @defaultValue true
|
|
97
|
-
* @example false
|
|
98
|
-
*/
|
|
99
|
-
verbose?: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* 是否启用图标注入和文件复制功能
|
|
102
|
-
*
|
|
103
|
-
* @defaultValue true
|
|
104
|
-
* @example false
|
|
105
|
-
*/
|
|
106
|
-
enabled?: boolean;
|
|
107
|
-
/**
|
|
108
|
-
* 图标文件复制配置选项
|
|
109
|
-
*
|
|
110
|
-
* @remarks
|
|
111
|
-
* 当此对象存在时,才会开启图标文件复制功能
|
|
112
|
-
*/
|
|
113
|
-
copyOptions?: CopyOptions;
|
|
114
|
-
}
|
|
115
|
-
export {};
|
|
File without changes
|