From 881369f30e2f58cd82d66a69a06514b6e4431c09 Mon Sep 17 00:00:00 2001 From: Sergey Rubanov Date: Wed, 20 Sep 2023 21:10:16 +0200 Subject: [PATCH] chore(bin/generate-docs.js): simplify generator a bit --- bin/generate-docs.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bin/generate-docs.js b/bin/generate-docs.js index b7ede90da3..d7e41ab324 100755 --- a/bin/generate-docs.js +++ b/bin/generate-docs.js @@ -43,13 +43,11 @@ const SOCKET_NODE_DIR = 'npm/packages/@socketsupply/socket-node' const chunks = await Promise.all(modules.map(async module => { const src = await fs.readFile(path.relative(process.cwd(), `${dest}/${module}`)) const srcFile = path.relative(process.cwd(), `${dest}/${module}`) - const { content, header } = generateApiModuleDoc({ src, srcFile, gitTagOrBranch }) - return { module, content, header } + return generateApiModuleDoc({ src, srcFile, gitTagOrBranch }) })) // modules special with special handling chunks.push({ - module: 'buffer.js', header: 'Buffer', content: ` # [Buffer](https://github.com/socketsupply/socket/blob/master/api/buffer.js) @@ -59,7 +57,6 @@ Buffer module is a [third party](https://github.com/feross/buffer) vendor module External docs: https://nodejs.org/api/buffer.html ` }, { - module: 'events.js', header: 'Events', content: ` # [Events](https://github.com/socketsupply/socket/blob/master/api/events.js)