UNPKG

@gaonengwww/tiny-toolkit-docs

Version:

这里对你的套件进行简单描述, 比如适用哪些场景,使用了什么技术, 有什么特点

35 lines (34 loc) 1.19 kB
/** * 用户输入的是用横杠连接的名字 * 根据用户输入的name生成各类规格变量名: 横杠连接,小驼峰,大驼峰,全大写 */ export declare function generateNames(name: string): { fileName: string; varName: string; className: string; constName: string; }; /** * 获取模板文件夹路径 * @param source template目录下的路径 */ export declare function getTemplatePath(source?: string): string; /** * 获取目标文件夹路径,参数不传为为当前命令执行的目录 * @param dist 目标根目录下的子文件夹路径 */ export declare function getDistPath(dist?: string): string; /** * 设置模块的缓存 * @param name 模块名称 */ export declare function setModuleCache(name: string): void; export declare function modifyFileContent(filePath: string, sourceRegx: string | RegExp, targetRegx: string): void; declare const _default: { getDistPath: typeof getDistPath; getTemplatePath: typeof getTemplatePath; generateNames: typeof generateNames; setModuleCache: typeof setModuleCache; modifyFileContent: typeof modifyFileContent; }; export default _default;