Skip to content

Commit

Permalink
fix: when generating api doc link, check typedoc entry point (#1318)
Browse files Browse the repository at this point in the history
If a package is in a monorepo and it has no typedoc entry point no
API doc link should be generated.
  • Loading branch information
achingbrain authored Jun 28, 2023
1 parent 4aac80c commit 8f4ab17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/check-project/readme/api-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
* @param {*} [parentManifest]
*/
export const APIDOCS = (pkg, parentManifest) => {
// monorepo project - test for typedoc entry point
if (parentManifest != null && pkg.typedoc?.entryPoint == null) {
return ''
}

// test for docs script in monorepo root or package
const scripts = parentManifest?.scripts ?? pkg.scripts ?? {}

if (scripts.docs == null) {
Expand Down

0 comments on commit 8f4ab17

Please sign in to comment.