1 decade ago
by MikeL
Does anyone know of an easy way to generate documentation from javascript code? I'm thinking of something akin to Ruby's Rdoc.
1 decade ago
by nefD
A few potential tools which could help in this department:
YUI Doc:
http://www.yuiblog.com/blog/2008/12/08/yuidoc/
JSDoc:
http://jsdoc.sourceforge.net/
I'll give both of these a shot and see what I can come up with. Thing is, without actual doc comments being placed in the code, the best you'll get with automatic docs is function/method names and parameter lists, which is at least a start.
1 decade ago
by MikeL
That's great nefD. Thanks. I'll look into those.
I actually have been putting comments in my code (for once) and am really looking for a way to prevent having to duplicate the work in separate documentation. Thinking for example of an easier way to generate a README file for github projects by extracting the existing comments out of my code.
1 decade ago
by nefD
I did an initial run with YUIDoc, but without inline comments, it didn't pick up on anything. :(
I'm going to keep digging around to see if theres at least a way to automatically pick out functions and their parameters.
1 decade ago
by nefD
Well, I also tried a package called jsdoc-toolkit, but to no avail. I'm fairly confident it has to do with the way impact handles it's objects, loading them as 'modules'. The doc generators have no idea how to handle these because theres no real scope for them to grab on to. I suspect the only way forward would be to either manually insert doc blocks (even basic ones would do for now), or figure out a way to automatically generate doc blocks and then run the source through a doc generator.
1 decade ago
by TObe
RoboDoc is a good documentation generator. Here is also a
comparison table of documentation generators
1 decade ago
by MikeL
Thanks for checking those out nefD. It may be that the RoboDoc is the way to go insofar as it will at least extract out the comments. Thanks for the tip TObe.
Page 1 of 1
« first
« previous
next ›
last »