vite-plugin-mdicon2svg
Version:
Vite plugin to transform md-icon to svgs
24 lines • 1.28 kB
TypeScript
import { type Cache } from './types.js';
import { Variant, type MdIconName } from 'mwc3-back-helpers';
export declare const MD_ICON_REGEX: RegExp;
export declare let cache: Cache;
export declare function readdir(glob: string | string[]): Promise<string[]>;
export declare function loadCache(): Promise<Cache | undefined>;
export declare function saveCache(cache: Cache): Promise<void>;
export declare function setCache(newCache: Cache): void;
export declare function stripCommentsFromContent(content: string): string;
export interface IconData {
name: MdIconName;
fill: boolean;
svg?: string;
}
/**
* This function returns a *distinct* list.
*/
export declare function findIconsInContent(content: string, includeComments?: boolean): IconData[];
export declare function findIconsInFiles(glob: string | string[], includeComments?: boolean): Promise<IconData[]>;
export declare function dataIsEqual(data1: IconData[], data2: IconData[]): boolean;
export declare function fetchSvg(iconName: string, variant: Variant, fill?: boolean): Promise<string>;
export declare function nameToConstant(iconName: string, fill?: boolean): string;
export declare function getCachedSvg(iconName: string, variant: Variant, fill?: boolean): string;
//# sourceMappingURL=utils.d.ts.map