import { Contracts } from "ts-extractor" ; import { GeneratorConfigurationBuilder } from "./builders/generator-configuration-builder" ; import { Generator } from "./generator" ; import { BasePlugin } from "./abstractions/base-plugin" ; import { PluginOptions , SupportedApiItemKindType , PluginResult } from "./contracts/plugin" ; import { GeneratorHelpers } from "./generator-helpers" ; export class PluginDebug extends BasePlugin { public SupportedApiDefinitionKind ( ) { return [ GeneratorHelpers . ApiDefinitionKind . Any ] ; } public Render ( options , apiItem ) { return { ... GeneratorHelpers . GetDefaultPluginResultData ( ) , Reference : options . Reference , ApiItem : apiItem , Result : [ "# Debug Plugin" , "" , `${ apiItem . Name }: ${ apiItem . ApiKind }` ] } ; } } async function Main ( ) { const projectDirectory = process . cwd ( ) ; const entryFiles = [ "./src/index.ts" ] ; const configPromise = new GeneratorConfigurationBuilder ( projectDirectory ) . Build ( entryFiles ) ; const config = await configPromise ; const generator = new Generator ( config ) ; await generator . WriteToFiles ( ) ; } Main ( ) ;