Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/generators/legacy-json-all/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ export default {
}

if (output) {
await writeFile(join(output, 'all.json'), JSON.stringify(generatedValue));
await writeFile(
join(output, 'all.json'),
JSON.stringify(generatedValue, null, 2)
);
}

return generatedValue;
Expand Down
5 changes: 4 additions & 1 deletion src/generators/legacy-json/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ export default {
for (const section of chunkResult) {
const out = join(output, `${section.api}.json`);

await writeFile(out, JSON.stringify(section));
// eslint-disable-next-line no-unused-vars
const { api, ...content } = section;

await writeFile(out, JSON.stringify(content, null, 2));
}
}

Expand Down
Loading