build: pnpm (#9806)

This commit is contained in:
Noel
2023-08-27 20:24:03 +02:00
committed by GitHub
parent 8325fa6540
commit e96a8a977f
82 changed files with 24444 additions and 28614 deletions

View File

@@ -17,14 +17,12 @@ interface CustomFiles {
path?: string;
}
export function build({ input, custom: customDocs, root, output, typescript }: CLIOptions) {
export async function build({ input, custom: customDocs, root, output, typescript }: CLIOptions) {
let data: (ChildTypes & RootTypes)[] | DeclarationReflection[] = [];
if (typescript) {
console.log('Parsing Typescript in source files...');
const app = new Application();
app.options.addReader(new TSConfigReader());
app.bootstrap({ entryPoints: input });
const project = app.convert();
const app = await Application.bootstrap({ entryPoints: input }, [new TSConfigReader()]);
const project = await app.convert();
if (project) {
// @ts-expect-error: Types are lost with this method
data = app.serializer.toObject(project).children!;