Skip to content

Commit 72775f1

Browse files
committed
fix: update tsdoc defaults and keep api docs in readmes
1 parent a30b8f7 commit 72775f1

File tree

5 files changed

+25
-7
lines changed

5 files changed

+25
-7
lines changed
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
/* eslint-disable no-console */
22

3+
import path from 'node:path'
4+
import fs from 'fs-extra'
5+
import {
6+
ensureFileHasContents
7+
} from './utils.js'
8+
39
/**
410
* @param {string} projectDir
511
*/
612
export async function checkMonorepoFiles (projectDir) {
713
console.info('Check monorepo files')
814

9-
// we don't need any special files since npm has workspace support,
10-
// but if we did, they'd be set up here
15+
const manifest = path.join(projectDir, 'package.json')
16+
const pkg = fs.readJSONSync(manifest)
17+
18+
await ensureFileHasContents(projectDir, 'typedoc.json', JSON.stringify({
19+
$schema: 'https://typedoc.org/schema.json',
20+
name: pkg.name,
21+
readme: './README.md',
22+
headings: {
23+
readme: false,
24+
document: false
25+
}
26+
}, null, 2))
1127
}

src/check-project/check-typedoc-files.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export async function checkTypedocFiles (projectDir, isTypescriptProject) {
4343
})
4444

4545
await ensureFileHasContents(projectDir, 'typedoc.json', JSON.stringify({
46+
readme: 'none',
4647
entryPoints
4748
}, null, 2))
4849
}

src/check-project/files/.github/workflows/semantic-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ on:
99

1010
jobs:
1111
main:
12-
uses: pl-strflt/.github/.github/workflows/reusable-semantic-pull-request.yml@v0.3
12+
uses: ipdxco/unified-github-workflows/.github/workflows/reusable-semantic-pull-request.yml@v1

src/check-project/files/.github/workflows/stale.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ name: Close and mark stale issue
33
on:
44
schedule:
55
- cron: '0 0 * * *'
6+
workflow_dispatch:
67

78
permissions:
89
issues: write
910
pull-requests: write
1011

1112
jobs:
1213
stale:
13-
uses: pl-strflt/.github/.github/workflows/reusable-stale-issue.yml@v0.3
14+
uses: ipdxco/unified-github-workflows/.github/workflows/reusable-stale-issue.yml@v1

src/check-project/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ async function processMonorepo (projectDir, manifest, branchName, repoUrl, ciFil
139139
continue
140140
}
141141

142-
const manifest = path.join(subProjectDir, 'package.json')
142+
const subProjectManifest = path.join(subProjectDir, 'package.json')
143143

144-
if (!fs.existsSync(manifest)) {
144+
if (!fs.existsSync(subProjectManifest)) {
145145
continue
146146
}
147147

148-
const pkg = fs.readJSONSync(manifest)
148+
const pkg = fs.readJSONSync(subProjectManifest)
149149
const homePage = `${webRoot}/${subProjectDir.includes(projectDir) ? subProjectDir.substring(projectDir.length) : subProjectDir}`
150150

151151
console.info('Found monorepo project', pkg.name)

0 commit comments

Comments
 (0)