Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which comments documentation format is better for JavaScript?

Is there are any comments documentation format for JavaScript and processor for this format which generates HTML documentation?

Currently I am using VSDoc xml comments for providing IntelliSense help at developing time, but as I know there is no documentation generator for such comments. So alternatively my question may sounds like: Is there are any utility which translates VSDoc comments from JavaScript files to HTML?

like image 758
Eskat0n Avatar asked Sep 24 '11 16:09

Eskat0n


People also ask

What is the best documentation for JavaScript?

The standards for JavaScript are the ECMAScript Language Specification (ECMA-262) and the ECMAScript Internationalization API specification (ECMA-402).

What is the right kind of JavaScript comment?

In JavaScript, single-line comments begin with // . It will ignore all the things immediately after // syntax until the end of that line. This is also known as inline commenting when we use // syntax alongside codes lines.

What are proper comments in JavaScript?

Single line Javascript comments start with two forward slashes (//). All text after the two forward slashes until the end of a line makes up a comment, even when there are forward slashes in the commented text.

Does doxygen support JavaScript?

check the doxygen pages, there is support for Javascript.


2 Answers

Have you looked at auto generated documentation from JavaDoc or VSDoc or JSDoc or anything like that.

They are all ugly and un-readable.

The solution is two fold

  • annotate your code with docco
  • Make your API documentation hand written.

There is a third option which is to revolutionize the way we do auto generated documentation, if you can then please do.

like image 185
Raynos Avatar answered Sep 21 '22 02:09

Raynos


I've used Natural Docs for a few projects. The syntax is nice for reading the inline, but since it doesn't have "full language support" for JavaScript, you have to be somewhat explicit about each function/constant/class/whatever you want to document.

like image 34
Matthew Crumley Avatar answered Sep 21 '22 02:09

Matthew Crumley