mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-08 14:32:50 +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 {
|
export function getProjectReflection(srcPath: PathLike): ProjectReflection {
|
||||||
logger.info(`Generating project reflection for ${srcPath.toString()}.`);
|
logger.info(`Generating project reflection for ${srcPath.toString()}.`);
|
||||||
|
|
||||||
|
const tsconfigPath = getTsconfigPath(srcPath.toString());
|
||||||
|
|
||||||
// initialize new Typedoc application
|
// initialize new Typedoc application
|
||||||
const app = new Application({
|
const app = new Application({
|
||||||
excludeExternals: true,
|
excludeExternals: true,
|
||||||
includeDeclarations: true,
|
includeDeclarations: true,
|
||||||
module: 'commonjs',
|
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
|
// get input files
|
||||||
const inputFiles = app.expandInputFiles([srcPath.toString()]);
|
const inputFiles = app.expandInputFiles([inputFilePath.toString()]);
|
||||||
|
|
||||||
// get project reflection from input files
|
// get project reflection from input files
|
||||||
const result = app.convert(inputFiles);
|
const result = app.convert(inputFiles);
|
||||||
|
|||||||
Reference in New Issue
Block a user