From cbe6e16bdf617ca1a0c2fd384739cc596f5af10c Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 23 Oct 2022 14:11:10 -0600 Subject: [PATCH] Add warning for missing tsconfig --- CHANGELOG.md | 4 ++++ src/lib/utils/options/readers/tsconfig.ts | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d4aeb29d..bd1a532b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Unreleased +### Features + +- Improved error reporting when failing to find entry points, #2080, #2082. + ### Bug Fixes - Constructor parameter-properties will now use the `@param` comment for the parameter if available, #1261. diff --git a/src/lib/utils/options/readers/tsconfig.ts b/src/lib/utils/options/readers/tsconfig.ts index 042226119..7ed521e91 100644 --- a/src/lib/utils/options/readers/tsconfig.ts +++ b/src/lib/utils/options/readers/tsconfig.ts @@ -22,6 +22,7 @@ import { tsdocModifierTags, } from "../tsdoc-defaults"; import { unique } from "../../array"; +import { EntryPointStrategy } from "../../entry-point"; function isFile(file: string) { return existsSync(file) && statSync(file).isFile(); @@ -104,6 +105,13 @@ export class TSConfigReader implements OptionsReader { logger.error( `The tsconfig file ${nicePath(file)} does not exist` ); + } else if ( + container.getValue("entryPointStrategy") !== + EntryPointStrategy.Packages + ) { + logger.warn( + "No tsconfig file found, this will prevent TypeDoc from finding your entry points." + ); } return; }