diff --git a/src/generators/legacy-json/index.mjs b/src/generators/legacy-json/index.mjs index a55aa84..df102a2 100644 --- a/src/generators/legacy-json/index.mjs +++ b/src/generators/legacy-json/index.mjs @@ -49,17 +49,17 @@ export default { return section; }; - for (const node of headNodes) { + await Promise.all(headNodes.map(async node => { // Get the json for the node's section const section = processModuleNodes(node); - + // Write it to the output file await writeFile( join(output, `${node.api}.json`), JSON.stringify(section), 'utf8' ); - } + })); return generatedValues; },