diff --git a/.claude/settings.json b/.claude/settings.json index 72bbed76d..f9d192477 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -30,6 +30,7 @@ "Bash(npm install)", "Bash(npm install:*)", "Bash(npm run build:*)", + "Bash(npm run docs:*)", "Bash(npm run lint:*)", "Bash(npm run lint:fix:*)", "Bash(npm show:*)", diff --git a/.github/maintainers_guide.md b/.github/maintainers_guide.md index af96c1e02..400469624 100644 --- a/.github/maintainers_guide.md +++ b/.github/maintainers_guide.md @@ -77,7 +77,13 @@ Remove cached project dependencies with `rm -r node_modules package-lock.json` b The reference docs for each package is independent of the others. They're generated using the `typedoc` and `typedoc-plugin-markdown` packages with the configurations of the package's `typedoc.json` file. -Each package has a script to these generate reference docs. For example: +Generate reference docs for all packages: + +```sh +npm run docs +``` + +Or generate docs for a specific package. For example: ```sh npm run docs --workspace packages/web-api diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 324adb5ce..b6448afd9 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -61,6 +61,8 @@ jobs: npm run build --workspace=@slack/socket-mode - name: Lint run: npm run lint + - name: Build docs + run: npm run docs - name: Run tests (Node 18/20) if: matrix.node-version != '22.x' shell: bash diff --git a/package.json b/package.json index d0255ed53..4ab48b775 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ ], "scripts": { "changeset": "npx @changesets/cli", + "docs": "npm run docs --workspaces --if-present", "lint": "npx @biomejs/biome check packages", "lint:fix": "npx @biomejs/biome check --write packages", "test": "npm test --workspaces --if-present" @@ -30,6 +31,8 @@ "@types/node": "^18.19.130", "shx": "^0.4.0", "tsx": "^4.20.6", + "typedoc": "^0.28.7", + "typedoc-plugin-markdown": "^4.7.1", "typescript": "5.9.3" } } diff --git a/packages/cli-test/package.json b/packages/cli-test/package.json index d1e537352..5d155518c 100644 --- a/packages/cli-test/package.json +++ b/packages/cli-test/package.json @@ -43,8 +43,6 @@ "devDependencies": { "@types/sinon": "^21.0.0", "cross-env": "^10.0.0", - "sinon": "^21.0.0", - "typedoc": "^0.28.7", - "typedoc-plugin-markdown": "^4.7.1" + "sinon": "^21.0.0" } } diff --git a/packages/logger/package.json b/packages/logger/package.json index af302dd2d..55537a023 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -39,9 +39,5 @@ }, "dependencies": { "@types/node": ">=18" - }, - "devDependencies": { - "typedoc": "^0.28.7", - "typedoc-plugin-markdown": "^4.7.1" } } diff --git a/packages/oauth/package.json b/packages/oauth/package.json index d36dfed71..ca7a5ae26 100644 --- a/packages/oauth/package.json +++ b/packages/oauth/package.json @@ -50,8 +50,6 @@ "devDependencies": { "@types/sinon": "^21", "rewiremock": "^3", - "sinon": "^21", - "typedoc": "^0.28.7", - "typedoc-plugin-markdown": "^4.7.0" + "sinon": "^21" } } diff --git a/packages/rtm-api/package.json b/packages/rtm-api/package.json index ef2dcf222..01aa0e9cc 100644 --- a/packages/rtm-api/package.json +++ b/packages/rtm-api/package.json @@ -57,8 +57,6 @@ "devDependencies": { "@types/sinon": "^17", "@types/ws": "^8", - "sinon": "^21", - "typedoc": "^0.28.7", - "typedoc-plugin-markdown": "^4.7.1" + "sinon": "^21" } } diff --git a/packages/socket-mode/package.json b/packages/socket-mode/package.json index f2382ea92..cb4d3827e 100644 --- a/packages/socket-mode/package.json +++ b/packages/socket-mode/package.json @@ -62,8 +62,6 @@ "@types/sinon": "^21", "nodemon": "^3.1.0", "proxyquire": "^2.1.3", - "sinon": "^21", - "typedoc": "^0.28.7", - "typedoc-plugin-markdown": "^4.7.0" + "sinon": "^21" } } diff --git a/packages/types/package.json b/packages/types/package.json index 896ff08db..b8ba5b5c2 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -39,9 +39,7 @@ "test:types": "tsd" }, "devDependencies": { - "tsd": "^0.33.0", - "typedoc": "^0.28.7", - "typedoc-plugin-markdown": "^4.7.1" + "tsd": "^0.33.0" }, "tsd": { "directory": "test" diff --git a/packages/web-api/package.json b/packages/web-api/package.json index 70feb7882..b66789b0c 100644 --- a/packages/web-api/package.json +++ b/packages/web-api/package.json @@ -68,9 +68,7 @@ "busboy": "^1", "nock": "^14", "sinon": "^21", - "tsd": "^0.33.0", - "typedoc": "^0.28.7", - "typedoc-plugin-markdown": "^4.7.1" + "tsd": "^0.33.0" }, "tsd": { "directory": "test/types" diff --git a/packages/webhook/package.json b/packages/webhook/package.json index 375747fc2..b2644500e 100644 --- a/packages/webhook/package.json +++ b/packages/webhook/package.json @@ -47,8 +47,6 @@ "axios": "^1.13.5" }, "devDependencies": { - "nock": "^14.0.6", - "typedoc": "^0.28.7", - "typedoc-plugin-markdown": "^4.7.1" + "nock": "^14.0.6" } }