UNPKG

dumi

Version:

📖 Documentation Generator of React Component

40 lines (39 loc) • 1.28 kB
import Cache from 'file-system-cache'; /** * get route path from file-system path */ export declare function getFileIdFromFsPath(fsPath: string): string; /** * get range lines of markdown file */ export declare const getFileRangeLines: (content: string, range: string) => string; /** * get file content by regular expression * @param content source file content * @param regexp regular expression string * @param filePath source file path */ export declare const getFileContentByRegExp: (content: string, regexp: string, filePath: string) => string; /** * parse frontmatter from code string */ export declare function parseCodeFrontmatter(raw: string): { code: string; frontmatter: Record<string, any> | null; }; declare const caches: Record<string, ReturnType<typeof Cache>>; export declare function _setFSCacheDir(dir: string): void; export declare function getCache(ns: string): (typeof caches)['0']; /** * try to get father config */ export declare function tryFatherBuildConfigs(cwd: string): Promise<any[]>; /** * get root dir for monorepo project */ export declare function getProjectRoot(cwd: string): string; /** * generate hash for string */ export declare function getContentHash(content: string, length?: number): string; export {};