UNPKG

svg-spritemap-webpack-plugin

Version:

Generates symbol-based SVG spritemap from all .svg files in a directory

28 lines (27 loc) 799 B
import { z } from 'zod'; import { SetRequired } from 'type-fest'; import { OPTIONS_SCHEMA } from './constants.js'; export type Patterns = 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;