Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript documentation generation [closed]

Im looking into documenting the javascript code we develop and are looking for some good javascript documentation generators, does anybody have any suggestions?

We used to used ndoc to create documentation for our c# code and are looking for something similar to document our js code - ideally something that can be run from a command line.

thanks in advance!

like image 844
Dave Lister Avatar asked Feb 13 '12 15:02

Dave Lister


2 Answers

You can use famous JSDoc-Toolkit for that.

JsDoc Toolkit is an application, written in JavaScript, for automatically generating template-formatted, multi-page HTML (or XML, JSON, or any other text-based) documentation from commented JavaScript source code.

And yes it also has command line options.

like image 56
Sarfraz Avatar answered Sep 29 '22 21:09

Sarfraz


JSDoc is an approach to generating documentation from commented JavaScript. There are many variations:

  • It was originally implemented in Perl.
  • JSDoc-Toolkit ported it to JavaScript, but requires Java as it uses the Rhino JavaScript engine written in Java.
  • Several people have ported it to run directly on the node.js JavaScript engine/platform, e.g. node-jsdoc-toolkit.
  • dox also runs on node.js, it combines JSDoc-like tags and markdown markup but requires a separate templating engine(as used on Stack Overflow and github).

All run from the command line. Choose according to your tooling preferences. I like node.js for its speed and all-JavaScript-all-the-time feel. The DailyJS "Let's Make a Framework" post on writing documentation describes these and other tools; unfortunately dox was radically overhauled to just output JSON structures since that was written.

https://stackoverflow.com/q/1221413/1162195 mentions other JavaScript documentation generators.

like image 31
skierpage Avatar answered Sep 29 '22 21:09

skierpage