vue-docgen-cli
Version:
Generate documentation markdown files from VueJs components using the vue-docgen-api.
38 lines (37 loc) • 1.7 kB
TypeScript
import type { ComponentDoc } from 'vue-docgen-api';
import events from './templates/events';
import methods from './templates/methods';
import expose from './templates/expose';
import slots from './templates/slots';
import props from './templates/props';
import component from './templates/component';
import header from './templates/header';
import defaultExample from './templates/defaultExample';
import functionalTag from './templates/functionalTag';
import { FileEventType, SafeDocgenCLIConfig } from './config';
export { renderTags } from './templates/tags';
export { mdclean } from './templates/utils';
export { events, methods, slots, props, component, header, expose, defaultExample, functionalTag };
export { default as docgen } from './docgen';
export interface ContentAndDependencies {
content: string;
dependencies: string[];
docs: ComponentDoc[];
}
export interface SubTemplateOptions {
isSubComponent?: boolean;
hasSubComponents?: boolean;
}
export declare function getDependencies(doc: Pick<ComponentDoc, 'tags' | 'sourceFiles'>, compDirName: string, absolutePath: string): string[];
/**
* Umbrella that calls docgen
* Calls each template provided by the user
* And generates a markdown string + the list of dependencies
* @param absolutePath
* @param config
* @param componentRelativePath
* @param extraMd
* @returns content will contain the markdown text, dependencies contains
* an array of path to files that should trigger the update of this file
*/
export default function compileTemplates(event: FileEventType, absolutePath: string, config: SafeDocgenCLIConfig, componentRelativePath: string, subComponent?: boolean): Promise<ContentAndDependencies>;