Installing & Configuring JSDoc On Windows

This short tutorial will teach you how to install JSDoc on Windows. JSDOC is a Javascript documentation generator tool. You add formatted comments inside your javascript code, JSDOC takes all the commented javascript code as input and generates javadoc style documentation using those comments. For more details on how to use JSDOC visit http://jsdoc.sourceforge.net/.

Lets do the installation and configuration step-by-step.

  1. JSDoc is a perl script, so in order to execute JSDoc you have to install a perl interpreter. JSDoc documentation recommends ActivePerl for Windows users.
  2. Download the latest version of ActivePerl from http://www.activestate.com. Install ActivePerl on your windows machine.
  3. Download JSDoc from http://sourceforge.net/projects/jsdoc.
  4. Extract the downloaded zip file (above) in any folder.
  5. Now, in order to run JSDoc using ActivePerl you have to install HTML-Template package for ActivePerl.
  6. Assuming that you installed ActivePerl in c:perl, go to c:perlbin and execute the command ‘ppm’.
  7. ppm is a package manager for ActivePerl. The command ‘ppm’ will open up a window showing you a list of all available packages. Give it sometime to download data from the Internet.
  8. Click on the button that reads "View All Packages" from the leftmost corner of the toolbar (or type Ctrl + 1 together).
  9. You’ll see a complete list of all packages. Scroll down to find HTML-Template. Once you find this package right click on it and click on install. This package will be marked for installation.
  10. Now, you have to install the package that you just marked. Click on the button that reads "Run marked actions" (green colored arrow pointing towards right) or type Ctrl + Enter together.
  11. You’re done. ActivePerl is setup properly to run JSDoc.
  12. Now, assuming that you’re inside the ActivePerl bin (c:perlbin) folder and you had extracted jsdoc zip file in f:jsdoc you’ll run the command below to generate the documentation for a test javascript script file that comes with JSDoc.

perl f:jsdocjsdoc.pl F:jsdoctest.js

Thats it. Documentation will be created inside the bin folder of ActivePerl in a folder named js_docs_out (JSDoc creates the output in js_docs_out folder in the folder where you run the jsdoc script from).

Did this tutorial help a little? How about buy me a cup of coffee?

Buy me a coffee at ko-fi.com

Please feel free to use the comments form below if you have any questions or need more explanation on anything. I do not guarantee a response.

IMPORTANT: You must thoroughy test any instructions on a production-like test environment first before trying anything on production systems. And, make sure it is tested for security, privacy, and safety. See our terms here.