node-v10.16.3-x64.msi) installs Node.js to the default folder
C:\Program Files\nodejs. The executable
node.exe is in this folder. Setup also modifies the
PATH environment variable to point to Node.js and npm.
The setup process installs npm, "the recommended package manager for Node.js". It's website is at https://www.npmjs.com. You will need npm to install JSDoc. Run the following in a command window to see what npm packages are currently installed.
npm list -g
npm install -g jsdoc
-g installs JSDoc globally on your computer. The default location for global packages is the
C:\Users\YourName\AppData\Roaming\npm\node_modules\ folder. For more information on JSDoc, visit https://jsdoc.app/about-commandline.html or https://jsdoc.app/about-configuring-jsdoc.html. Note: If you ever need to uninstall this package, enter the following:
npm uninstall -g jsdoc
To generate the documentation, open a command window, navigate to the folder, and enter the following:
jsdoc -c config.json
This generates the documentation in the
out subfolder. If the output is good, the contents of this folder are moved to the help/api folder.
I hope you can appreciate all the work that goes into developing an application. Besides writing code, a developer must comment the code, and eventually publish documents explaining this code. Fortunately, JSDoc is able to automate some this effort.
Unfortunately, I have a few nitpicks with JSDoc. I need to use
@namespace for static classes. This is because JSDoc insists on displaying
new ClassName when everyone knows that a static class should not be instantiated. I also can't figure out how to override the default sort. JSDoc sorts by member name, while I would prefer to sort by the line number the member is declared.