From ac1a3de17c8840e80fe1609b44e26d287eec952c Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Sun, 29 Jan 2023 16:35:03 +0100 Subject: refactor(docs): split generate:api-docs execution from import (#1779) --- test/scripts/apidoc/utils.ts | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'test/scripts') diff --git a/test/scripts/apidoc/utils.ts b/test/scripts/apidoc/utils.ts index 61f3b848..809240c8 100644 --- a/test/scripts/apidoc/utils.ts +++ b/test/scripts/apidoc/utils.ts @@ -1,7 +1,6 @@ import type { SignatureReflection, TypeDocOptions } from 'typedoc'; import { - newTypeDocApp, - patchProject, + loadProject, selectApiMethodSignatures, selectApiModules, } from '../../../scripts/apidoc/typedoc'; @@ -11,22 +10,10 @@ import { mapByName } from '../../../scripts/apidoc/utils'; * Returns a record with the (Module-Name -> (Method-Name -> Method-Signature)) for the project. */ export function loadProjectModules( - options: Partial = { - entryPoints: ['src/index.ts'], - }, + options?: Partial, includeTestModules = false ): Record> { - const app = newTypeDocApp(); - - app.bootstrap(options); - - const project = app.convert(); - - if (project == null) { - throw new Error('Failed to convert project'); - } - - patchProject(project); + const [, project] = loadProject(options); const modules = selectApiModules(project, includeTestModules); -- cgit v1.2.3