Skip to content

Commit

Permalink
chore(bin/generate-docs.js): simplify generator a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
chicoxyzzy committed Sep 20, 2023
1 parent c0b0ca5 commit 5055cb6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bin/generate-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 5055cb6

Please sign in to comment.