I have been trying to generate single JSdoc for multiple packages in a monorepo(lerna used here). And also each package have it's own readme. On the top level there is a generic readme files. The library used for the purpose is here. What's the possible way to generate JSDoc ?
Configured Jsdoc based on config:
{
"tags": {
"allowUnknownTags": false
},
"plugins": [
"plugins/markdown"
],
"source": {
"include": [
"packages/A/",
"packages/B/"
],
"excludePattern": "\\.(?:|spec|test)\\.js$"
},
"sourceType": "module",
"opts": {
"readme": "README.md",
"template": "templates/default",
"encoding": "utf8",
"destination": "doc/",
"access": "public",
"recurse": true,
"verbose": true
},
"markdown": {
"parser": "gfm",
"hardwrap": true
},
"templates": {
"cleverLinks": true,
"monospaceLinks": false
}
}
Jsdoc generated for config with multiple sources listed properly in array.
"source": {
"include": [
"packages/A/",
"packages/B/"
],
"excludePattern": "\\.(?:|spec|test)\\.js$"
}
However Readme.md available in the every package of the monorepo not listed anywhere. Only the root level Readme.md available and rest of the packages readme not exists anywhere in the generated JSdoc. I couldn't figure it out a way to list all readme under corresponding module A & B specified source config. Configuration which I doubted is
"opts": {
"readme": "README.md",
"template": "templates/default",
"encoding": "utf8",
"destination": "doc/",
"access": "public",
"recurse": true,
"verbose": true
}
especially readme attribute in opts object mapped to the root level readme. Is it possible to provide all the monorepo packages readme in Opts ?
The link to refer configuration.
Any suggestions to generate JSdoc to monorepo is much appreciated. Thanks!