UNPKG

mdat

Version:

CLI tool and TypeScript library implementing the Markdown Autophagic Template (MDAT) system. MDAT lets you use comments as dynamic content templates in Markdown files, making it easy to generate and update readme boilerplate.

47 lines (46 loc) 2.51 kB
import { type VFile } from 'vfile'; import { type ConfigToLoad, type RulesToLoad } from '../config'; /** * Expands MDAT readme comments in the closest readme.md file * Basically an alias to `expandReadmeFiles()` with certain arguments elided. * @see `findReadme()` for more details on the search process. */ export declare function expandReadme(config?: ConfigToLoad, rules?: RulesToLoad): Promise<VFile[]>; /** * Expands MDAT readme comments in one or more Markdown files * Searches up for a readme.md file if none is provided. * @see `findReadme()` for more details on the search process. */ export declare function expandReadmeFiles(files?: string | string[], name?: string, output?: string, config?: ConfigToLoad, rules?: RulesToLoad): Promise<VFile[]>; /** * Expands MDAT readme comments in a Markdown string */ export declare function expandReadmeString(markdown: string, config?: ConfigToLoad, rules?: RulesToLoad): Promise<VFile>; /** * Checks and validates MDAT readme comments in the closest readme.md file * Basically an alias to `checkReadmeFiles()` with certain arguments elided. * @see `findReadme()` for more details on the search process. */ export declare function checkReadme(config?: ConfigToLoad, rules?: RulesToLoad): Promise<VFile[]>; /** * Checks and validates MDAT readme comments in one or more Markdown files * Searches up for a readme.md file if none is provided. * @see `findReadme()` for more details on the search process. */ export declare function checkReadmeFiles(files?: string | string[], name?: string, output?: string, config?: ConfigToLoad, rules?: RulesToLoad): Promise<VFile[]>; /** * Checks and validates MDAT readme comments in a Markdown string */ export declare function checkReadmeString(markdown: string, config?: ConfigToLoad, rules?: RulesToLoad): Promise<VFile>; /** * Collapses MDAT readme comments in the closest readme.md file * Basically an alias to `collapseReadmeFiles()` with certain arguments elided. * @see `findReadme()` for more details on the search process. */ export declare function collapseReadme(config?: ConfigToLoad, rules?: RulesToLoad): Promise<VFile[]>; /** * Collapses MDAT readme comments in one or more Markdown files * Searches up for a readme.md file if none is provided. * @see `findReadme()` for more details on the search process. */ export declare function collapseReadmeFiles(files?: string | string[], name?: string, output?: string, config?: ConfigToLoad, rules?: RulesToLoad): Promise<VFile[]>;