Skip to content

Commit 00adb0a

Browse files
deflisCopilot
andauthored
Update scripts/generate-llms-txt.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1544524 commit 00adb0a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

scripts/generate-llms-txt.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ async function processTypeDocJson(jsonPath) {
137137
const jsonContent = await readFile(jsonPath);
138138
if (!jsonContent) return '';
139139

140-
const apiDoc = JSON.parse(jsonContent);
140+
let apiDoc;
141+
try {
142+
apiDoc = JSON.parse(jsonContent);
143+
} catch (error) {
144+
console.error(`Error: Failed to parse TypeDoc JSON at ${jsonPath}: ${error.message}`);
145+
return '';
146+
}
141147
let result = '';
142148

143149
// Process main exports

0 commit comments

Comments
 (0)