fontmin-spider
Version:
Analyze which fonts are used on the page and eliminate the ones that are not used to get a smaller font file
12 lines (11 loc) • 658 B
TypeScript
import { TdeclaredFamilyMap, TfilterCallback } from './types';
/**
* Parsing the fonts used
* @param { string } basePath You can think of it as the root of the website
* @param { string[] } files Array of html files
* @param { Function } filter Execute when all the used fonts are parsed
* (the strings are not parsed, you can use the afterFilter method if you need to process the strings)
* @param { Function } afterFilter After parsing is complete, execute
* @returns { TdeclaredFamilyMap }
*/
export default function parse(basePath: string, files: string[], filter?: TfilterCallback, afterFilter?: TfilterCallback): TdeclaredFamilyMap;