Replies: 5 comments
-
Hi, you can use the jsdoc2md API to create your preferred output file and folder structure.. see here for an example custom script.. |
Beta Was this translation helpful? Give feedback.
-
That was not really my question. |
Beta Was this translation helpful? Give feedback.
-
Yes, it's possible - you can write a script that takes a folder path as input and writes output files to your required locations.. let me know if you have any other questions. |
Beta Was this translation helpful? Give feedback.
-
Is there a documentation where it says how to make it generate those files according to the same paths of the input folder ? Because I can't seem to find the part where it does that? |
Beta Was this translation helpful? Give feedback.
-
that's a specialised output file structure opinion that is not built into jsdoc2md (or jsdoc).. Currently, jsdoc2md takes file names as input and returns a You would need to write a custom script and control the output file structure yourself, something like this maybe? /* assuming you have created the `dirs` directory structure already */
for (const dir of dirs) {
for (const file of dir.files) {
const output = await jsdoc2md.render({ files: file.name })
/* define your output file structure logic here, e.g. */
await fs.writeFile(`docs/${dir.name}/${file.name}.md`, output)
}
} |
Beta Was this translation helpful? Give feedback.
-
Suppose we have a
src
folder that contains multiple subfolders ( random architecture) and all the files have a.ts
extensionIs it possible to generate all the
.md
files for those.ts
only by specifying the path to a specific folder ?For example:
when we run the command ( if it exists)
We will have the following:
And all the links & references will be of course made along.
Beta Was this translation helpful? Give feedback.
All reactions