vite-plugin-svg-spritegen 1.2.6 → 1.2.7
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/dist/build-svg-map.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/types.d.ts +33 -0
- package/dist/write-gitignore.d.ts +1 -0
- package/dist/write-if-changed.d.ts +1 -0
- package/dist/write-sprite.d.ts +2 -0
- package/dist/write-types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
ADDED
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FilterPattern } from 'vite';
|
|
2
|
+
import { Config as SvgoConfig } from 'svgo';
|
|
3
|
+
export interface InputConfig {
|
|
4
|
+
pattern?: string;
|
|
5
|
+
baseDir?: string;
|
|
6
|
+
prefix?: string;
|
|
7
|
+
getSymbolId?: (config: Omit<ResolvedInputConfig, 'symbolId'>) => string;
|
|
8
|
+
removeAttrs?: string[];
|
|
9
|
+
svgoPlugins?: SvgoConfig['plugins'];
|
|
10
|
+
svgo?: SvgoConfig | false;
|
|
11
|
+
}
|
|
12
|
+
export interface ResolvedInputConfig extends Required<InputConfig> {
|
|
13
|
+
symbolId: string;
|
|
14
|
+
matchPath: string;
|
|
15
|
+
filePath: string;
|
|
16
|
+
content: string;
|
|
17
|
+
}
|
|
18
|
+
export type SvgMap = Map<string, ResolvedInputConfig>;
|
|
19
|
+
export interface StripUnusedConfig {
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
srcInclude?: FilterPattern;
|
|
22
|
+
srcExclude?: FilterPattern;
|
|
23
|
+
whitelist?: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface PluginConfig {
|
|
26
|
+
outputDir: string;
|
|
27
|
+
input?: InputConfig | InputConfig[];
|
|
28
|
+
stripUnused?: boolean | StripUnusedConfig;
|
|
29
|
+
typesFileName?: string;
|
|
30
|
+
spriteFileName?: string;
|
|
31
|
+
gitignore?: boolean;
|
|
32
|
+
matchPattern?: string | RegExp;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const writeGitignore: (filePath: string, spriteName: string, typesName: string) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const writeIfChanged: (filePath: string, content?: string) => boolean;
|
package/package.json
CHANGED