mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-15 18:56:18 +00:00
feat: ensure correct path for input files
This commit is contained in:
@@ -118,16 +118,23 @@ export interface ExpectableValidationErrors {
|
||||
export function getProjectReflection(srcPath: PathLike): ProjectReflection {
|
||||
logger.info(`Generating project reflection for ${srcPath.toString()}.`);
|
||||
|
||||
const tsconfigPath = getTsconfigPath(srcPath.toString());
|
||||
|
||||
// initialize new Typedoc application
|
||||
const app = new Application({
|
||||
excludeExternals: true,
|
||||
includeDeclarations: true,
|
||||
module: 'commonjs',
|
||||
tsconfig: join(getTsconfigPath(srcPath.toString()), 'tsconfig.json'),
|
||||
tsconfig: join(tsconfigPath, 'tsconfig.json'),
|
||||
});
|
||||
|
||||
let inputFilePath = srcPath;
|
||||
if (inputFilePath === tsconfigPath) {
|
||||
inputFilePath = join(tsconfigPath, 'src');
|
||||
}
|
||||
|
||||
// get input files
|
||||
const inputFiles = app.expandInputFiles([srcPath.toString()]);
|
||||
const inputFiles = app.expandInputFiles([inputFilePath.toString()]);
|
||||
|
||||
// get project reflection from input files
|
||||
const result = app.convert(inputFiles);
|
||||
|
||||
Reference in New Issue
Block a user