Using JSdoc/Doxygen or both for documenting Node addons

1,028 views
Skip to first unread message

Oleg "Sannis" Efimov

unread,
Sep 8, 2010, 8:27:45 AM9/8/10
to nodejs
As far as I can see, very few people use these tools for documenting
code. Nevertheless, I hope my thoughts are someone interested.
For addons that are written in pure JavaScript, you can use JSDoc and
not to worry. However, if the addon is partially written in C, it is
impossible.
A possible way out could be starting the module, a list of available
methods with sys.inspect() or similar methods, and further extract
documenting comments from the addon source.

Is this way good or already established practice of documenting such
projects? I think

r...@tinyclouds.org

unread,
Sep 8, 2010, 2:08:15 PM9/8/10
to nod...@googlegroups.com

We're using "ronn.js" to manually document code in markdown.
Generating docs from source is problematic - especially with a dynamic
language like javascript.

Oleg "Sannis" Efimov

unread,
Sep 9, 2010, 9:16:11 AM9/9/10
to nodejs
I do not see a problem when you just need to describe the interface of
the library, without delving into its internal structure. Especially
since I have not seen addons that would use inheritance or other
complex structures, usually they are wrapper over the C++ object and
have V8 proxy methods to existing C++ functions.

However, I can write the documentation in a Ronn style, and just write
a simple utility to check whether all the functions described there.

Thanks!

On Sep 8, 10:08 pm, r...@tinyclouds.org wrote:

tjholowaychuk

unread,
Sep 10, 2010, 11:11:13 AM9/10/10
to nodejs
I use http://visionmedia.github.com/dox/
it is by no means the be-all end-all solution, and is very picky in
terms of comments right
now, BUT it works with markdown comment bodies along with JSDoc which
is converted to markdown
before producing the html output, and themed much like docco is.

On Sep 9, 6:16 am, "Oleg \"Sannis\" Efimov" <efimo...@gmail.com>

fuzzy spoon

unread,
Sep 10, 2010, 12:17:46 PM9/10/10
to nod...@googlegroups.com
Thanks for this !
I needed a simpler generator for what i was working on.

> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
>

Oleg "Sannis" Efimov

unread,
Sep 10, 2010, 8:21:08 PM9/10/10
to nodejs
Thanks for you, TJ.
I've looked at rocco/docco/shocco and your dox is good :-)
I'll try to use this for make documentation based on examples. Maybe
I'll write smth similar for documentind C++ Node addods code.

On Sep 10, 7:11 pm, tjholowaychuk <tjholoway...@gmail.com> wrote:
> I usehttp://visionmedia.github.com/dox/
Reply all
Reply to author
Forward
0 new messages