Skip to content

Commit d29a3d2

Browse files
authored
docs: generate API reference docs from TS packages (#41)
* docs: generate API reference docs from TS packages * chore: rename App Kit to AppKit * chore: mark some stuff as internal, rename Variables to Helpers * chore: remove appkit-ui generated docs * chore: flatten docs structure
1 parent 89bc148 commit d29a3d2

33 files changed

+1827
-88
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
filters: |
3232
docs:
3333
- 'docs/**'
34+
- 'packages/**'
3435
appkit:
3536
- '!docs/**'
3637
@@ -97,4 +98,23 @@ jobs:
9798
run: pnpm install --frozen-lockfile
9899
- name: Build Docs
99100
run: pnpm run docs:build
101+
- name: Lint Generated Docs
102+
run: pnpm run docs:lint
103+
- name: Format Generated Docs
104+
run: pnpm run docs:format
105+
- name: Check for uncommitted docs changes
106+
run: |
107+
if ! git diff --exit-code docs/docs/api/; then
108+
echo "❌ Error: Generated docs are out of sync with the codebase."
109+
echo ""
110+
echo "The API documentation in docs/docs/api/ has changes after running docs:generate."
111+
echo "This means the committed docs don't match the current package code."
112+
echo ""
113+
echo "To fix this:"
114+
echo " 1. Run: pnpm docs:build"
115+
echo " 2. Run: pnpm docs:format"
116+
echo " 3. Review and commit the changes"
117+
echo ""
118+
exit 1
119+
fi
100120

apps/clean-app/src/main.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ import { createRoot } from "react-dom/client";
33
import "./index.css";
44
import App from "./App.tsx";
55

6-
createRoot(document.getElementById("root")!).render(
6+
const rootElement = document.getElementById("root");
7+
if (!rootElement) {
8+
throw new Error("Root element not found");
9+
}
10+
11+
createRoot(rootElement).render(
712
<StrictMode>
813
<App />
914
</StrictMode>,

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"!**/coverage",
1717
"!packages/appkit-ui/src/react/ui",
1818
"!**/routeTree.gen.ts",
19-
"!docs/.docusaurus"
19+
"!docs/.docusaurus",
20+
"!**/typedoc-sidebar.ts"
2021
]
2122
},
2223
"formatter": {

0 commit comments

Comments
 (0)