From 9a84009f472931d21f118478a4f2ca7f137ccabe Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 8 Mar 2021 01:26:42 +0000 Subject: [PATCH] fix(core): update --- ts/tsdoc.classes.typedoc.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ts/tsdoc.classes.typedoc.ts b/ts/tsdoc.classes.typedoc.ts index 53d22d9..9054a41 100644 --- a/ts/tsdoc.classes.typedoc.ts +++ b/ts/tsdoc.classes.typedoc.ts @@ -31,12 +31,17 @@ export class TypeDoc { }, include: [], }; + let startDirectory = ''; if (plugins.smartfile.fs.isDirectory(plugins.path.join(paths.cwd, './ts'))) { data.include.push(plugins.path.join(paths.cwd, './ts/**/*')); + startDirectory = 'ts'; } if (plugins.smartfile.fs.isDirectory(plugins.path.join(paths.cwd, './ts_web'))) { data.include.push(plugins.path.join(paths.cwd, './ts_web/**/*')); + if (!startDirectory) { + startDirectory = 'ts_web'; + } } await plugins.smartfile.memory.toFs(JSON.stringify(data), paths.tsconfigFile); @@ -45,7 +50,7 @@ export class TypeDoc { targetDir = plugins.path.join(targetDir, options.publicSubdir); } await this.smartshellInstance.exec( - `typedoc --tsconfig ${paths.tsconfigFile} --out ${targetDir} ts/index.ts` + `typedoc --tsconfig ${paths.tsconfigFile} --out ${targetDir} ${startDirectory}/index.ts` ); plugins.smartfile.fs.remove(paths.tsconfigFile); }