jsdoc configuration
jsdoc.conf.json at the repo root.
File#
{
"source": {
"include": ["src", "package.json", "README.md"],
"exclude": ["node_modules"],
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
"opts": {
"destination": "./docs",
"recurse": true
},
"tags": {
"allowUnknownTags": true
},
"templates": {
"cleverLinks": true,
"monospaceLinks": true
}
}
Inputs#
flowchart LR src[src/] --> jsdoc pkg[package.json] --> jsdoc readme[README.md] --> jsdoc
includePattern keeps .js, .jsdoc, .jsx. Underscore-prefixed files are dropped. There are none in src/ today.
README is the JSDoc home page. It still shows CDN @0.0.20 and a joke tone. Generated docs inherit that.
Output#
flowchart TB opts[opts.destination ./docs] --> html[HTML tree] recurse[recurse true] --> srcwalk[all src files]
No custom template package. Default JSDoc theme. cleverLinks / monospaceLinks only change how {@link} renders.
Tags#
flowchart LR unknown[allowUnknownTags true] --> keep[do not fail on extra tags]
Comments use @module, @class, @param, @returns, @throws, @private, @constant.
npm script#
flowchart LR npm["npm run docs"] --> cli["jsdoc -c jsdoc.conf.json --verbose"]
verbose prints which files were parsed. Destination docs/ is in .gitignore and .npmignore.