svg-spritemap-webpack-plugin
Version:
Generates symbol-based SVG spritemap from all .svg files in a directory
32 lines (31 loc) • 870 B
TypeScript
import { z } from 'zod';
import { SetRequired } from 'type-fest';
import { OPTIONS_SCHEMA } from './constants.js';
export type Patterns = string[];
export interface Source {
location: string;
content: string;
}
export interface Options extends z.infer<typeof OPTIONS_SCHEMA> {
}
export interface OptionsWithStyles extends Omit<Options, 'styles'> {
styles: SetRequired<Options['styles'], 'filename'>;
}
export declare enum StylesType {
Directory = "directory",
Module = "module",
Asset = "asset"
}
export declare enum Output {
Spritemap = "spritemap",
Styles = "styles"
}
export interface Variable {
name: string;
attribute: string;
value: string;
}
export interface VariableDefaultValueMismatch extends Pick<Variable, 'name'> {
values: Variable['value'][];
}
export type VariableRewriter = (variable: Variable) => string;