jQuery compatible JavaScript documentation generator
I need to choose a documentation generator (similar to jdoc in java or rdoc in ruby) for my javascript project that (built with jquery, underscore and backbone)
Candidates:
- jsdoc toolkit
- pdoc
- natural docs
- docco
- YUI doc
- doctool http://jquery.bassistance.de/docTool/docTool.html
- other ?
Requirements
- should work with jquery, underscore and backbone. that means object-literal methods etc
- I really like pdoc but its too centered around prototype, poorly documented, and I don't want to make extra files (sections?) to make it work (not sure about this)
- docco is nice but I want structured output (as in menu + class/func structure like jdoc)
- must be command line/makefile compatible (not web pastie)
Tips, tricks, tutorials, success stories, advice greatly welcomed.
开发者_如何学运维Why Doesn't jQuery use JSDoc?
I would rate jsduck from Sencha on top. I have used it on many projects. Simple to use
https://github.com/senchalabs/jsduck
A single command will generate docs like this http://docs.sencha.com/touch/2-0/
You could also look at Dox by TJ Holowaychuk; it's a fork of Docco, but adds some jsDoc syntax support. I personally find that jQuery code often lends itself to looser style of inline documentation like Docco, but I'm currently in the same situation of trying to decide what doc system to use.
I am going through the same exercise at the moment, and from what I've seen YUI Doc is the best. I love the fact that you can run it in "server" mode and view the documentation as you write it. Much better than having to execute a build each time you change the documentation. Also, the documentation that is generated is very easy to read and very well organized.
This is new so it may not fit your output requirements, but you might find njsdoc interesting. Unlike most JS documenters it tries to build documentation by executing the code and investigating the stack rather than just parsing the files for annotations.
https://bitbucket.org/nexj/njsdoc
There is DocumentJS*
*I haven't used it and I am not sure how well it will integrate with Backbone.
精彩评论