Skip to content

Commit

Permalink
Update tsdocParser script
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSonOfThomp committed Jan 17, 2025
1 parent a7edd18 commit a14df3d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/build/src/tsdoc/tsdocParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ export function parseTSDoc(
): Array<CustomComponentDoc> | undefined {
const { excludeTags } = defaults(options, defaultParseFunctionOptions);

const packageDir = path.resolve(process.cwd(), packageRoot);
const packageSrc = path.resolve(process.cwd(), packageRoot, 'src');

if (fse.existsSync(packageDir)) {
const componentFileNames = parseFileNames(packageDir);
if (fse.existsSync(packageSrc)) {
const componentFileNames = parseFileNames(packageSrc);

const pkgJsonPath = path.join(packageDir, 'package.json');
const pkgJsonPath = path.join(packageSrc, '../package.json');
const packageName = fse.existsSync(pkgJsonPath)
? JSON.parse(fse.readFileSync(pkgJsonPath, 'utf-8'))?.name
: undefined;
Expand Down Expand Up @@ -140,7 +140,7 @@ export function parseTSDoc(
console.warn(
chalk.yellow(
'Could not find directory:',
chalk.bold(`\`${packageDir}\``),
chalk.bold(`\`${packageSrc}\``),
),
);
}
Expand Down

0 comments on commit a14df3d

Please sign in to comment.