UNPKG

markdown-it-git-graph

Version:

一个markdown-it插件,用于生成git提交图

21 lines (20 loc) 768 B
interface MarkdownItGitGraphOptions { defaultBranchName?: string; theme?: Theme; } interface Theme { columns?: Column[]; dateFormat?: Intl.DateTimeFormatOptions; colors?: string[]; lineHeight?: number; lineWidth?: number; pointRadius?: number; } type Column = 'hash' | 'message' | 'date'; type RequiredTheme = Required<Theme>; type RequiredOptions = Required<{ [K in keyof MarkdownItGitGraphOptions]: Theme extends MarkdownItGitGraphOptions[K] ? RequiredTheme : MarkdownItGitGraphOptions[K]; }>; declare function getOptions(options?: MarkdownItGitGraphOptions): RequiredOptions; declare function parseTheme(text: string): Theme; export { Column, getOptions, MarkdownItGitGraphOptions, parseTheme, RequiredOptions, RequiredTheme, };