I search to understand how operate jsdoc, the generator of javascript documentation. When I use it, I have always all my documentation files on index.js and never the navigation (in the documentation web site) in my files, classes or modules. Furthermore, I have also some tags which do not appear in the documentation. However, I use just the tags given by usejsdoc web site (documentation of jsdoc).
Version :
Server.js
"use strict";
/**
* @module server
* @file
* The main file of this server. It create access routes. To use it, you can write on a terminal : $ node server.js <br />
* Turn in javascript strict mode. <br />
*
* @version 1.0
* @since 1.0
*
* @requires config
* @requires express
* @requires body-parser
* @requires messenger.scenario
* @requires messenger.routeMessenger
*/
const
// Official libraries
/**
* @access public
* @constant
* @description Use config file to param server.
*/
config = require("config"),
express = require('express'),
bodyParser = require('body-parser'),
I hope you can help me.
Best regards
I add jsdocs to typical javascript project by adding a script to package.json
"scripts": {
...
"docs": "./node_modules/jsdoc/jsdoc.js -c ./.jsdoc.conf.json"
}
and add a config file .jsdoc.conf.json
{
"plugins": [],
"recurseDepth": 10,
"opts": {
"recurse": true,
"destination": "./docs/"
},
"source": {
"include": ["src"],
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "node_modules"
},
"sourceType": "module",
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc", "closure"]
},
"templates": {
"cleverLinks": false,
"monospaceLinks": false
}
}
this generates the docs in a folder ./docs
in the root of the project.
You can then generate project docs by running npm run docs
.
You may also want to gitignore the generated docs. For full configuration options read http://usejsdoc.org/about-configuring-jsdoc.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With