Short answer:
In the conf.json file, add the opt element "sort": false , where sort indicates whether JSDoc should use alphabetical sorting.
Assuming you are using the conf.json file to specify JSDOC configuration parameters:
jsdoc -c path/to/conf.json
For example:
{ "tags": { "allowUnknownTags": false }, "source": { "includePattern": ".+\\.js(doc)?$", "excludePattern": "(^|\\/|\\\\)_" }, "plugins": [], "templates": { "cleverLinks": true, "monospaceLinks": false, }, "opts": { "encoding": "utf8", "lenient": false, "sort": false } }
I also met Docstrap , Bootstrap template for JSDoc3.
Then you can use the "sort" option in the templates section. An example conf.json file for this case might look like this:
{ "tags": { "allowUnknownTags": true, "dictionaries": ["jsdoc","closure"] }, "source": { "includePattern": ".+\\.js(doc|x)?$", "excludePattern": "(^|\\/|\\\\)_" }, "plugins": [], "templates": { "cleverLinks": false, "monospaceLinks": false "sort": false } }
Description on Docstrap website:
sort The default value is true. Indicates whether jsdoc should sort data or use file order. It can also be a string, and if it is passed directly to jsdoc. The default string is "longname, version, since".
treavg
source share