Skip to content

Commit b85afda

Browse files
committed
fix: exclude api from output
1 parent 7776223 commit b85afda

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/generators/legacy-json/index.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ export default {
7878
for (const section of chunkResult) {
7979
const out = join(output, `${section.api}.json`);
8080

81-
await writeFile(out, JSON.stringify(section, null, 2));
81+
// eslint-disable-next-line no-unused-vars
82+
const { api, ...content } = section;
83+
84+
await writeFile(out, JSON.stringify(content, null, 2));
8285
}
8386
}
8487

src/generators/legacy-json/utils/buildSection.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ export const createSectionBuilder = () => {
199199
return (head, entries) => {
200200
const rootModule = {
201201
type: 'module',
202+
api: head.api,
202203
source: head.api_doc_source,
203204
};
204205

0 commit comments

Comments
 (0)