font-spider-webpack-plugin
Version:
Font-spider webpack plugin
37 lines (36 loc) • 748 B
TypeScript
/// <reference types="node" />
/**
* 字体文件正则
*/
export declare const regxFont: RegExp;
/**
* @font-face正则
*/
export declare const regxFace: RegExp;
/**
* 临时文件目录
*/
export declare const tmpPath: string;
/**
* 清空目录
*
* @export
* @param {string} dirPath - 目录地址
*/
export declare function emptyDir(dirPath: string): void;
/**
* 写入临时文件
*
* @export
* @param {string} dirPath - 文件地址
* @param {(string | Buffer)} source - 内容
*/
export declare function writeTmp(dirPath: string, source: string | Buffer): void;
/**
* 获取路径中的文件名
*
* @export
* @param {string} [pathname='']
* @returns
*/
export declare function getFilename(pathname?: string): string;