diff --git a/src/generators/legacy-json-all/index.mjs b/src/generators/legacy-json-all/index.mjs index 1a2c5bd4..a98eb980 100644 --- a/src/generators/legacy-json-all/index.mjs +++ b/src/generators/legacy-json-all/index.mjs @@ -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; diff --git a/src/generators/legacy-json/index.mjs b/src/generators/legacy-json/index.mjs index b0ae17ea..7b6448d7 100644 --- a/src/generators/legacy-json/index.mjs +++ b/src/generators/legacy-json/index.mjs @@ -78,7 +78,7 @@ export default { for (const section of chunkResult) { const out = join(output, `${section.api}.json`); - await writeFile(out, JSON.stringify(section)); + await writeFile(out, JSON.stringify(section, null, 2)); } }