JQuery Annotated Source
robflaherty.github.io
robflaherty.github.io
docco: http://jashkenas.github.io/docco/
I just checked out jquery and built it myself. Here's a newer version:
The only thing I found the comments useful for understanding was pointing out the IE compatibility behavior.
Does this style of annotation exist for any other libraries/projects?
I think the left side could be expanded into a pretty good pedagogical tool using mini-examples and explanations to focus on key concepts in the code.
Underscore.js http://underscorejs.org/docs/underscore.html
No one cared.
http://code.ohloh.net/project?pid=LOfjD4AHjNo&prevcid=1&...
doc_code2html() takes PHP code as argument, and uses built-in PHP tokenizer to add CSS classes to code. After that, you can use vanilla CSS to color things up. Up to this day this is the simplest and most accurate PHP highlighter I've seen.
doc_getCodeAnchors() takes php code as argument and returns an associative array of anchors. I.e.:
array(
'MyClass.methodName' => array('line' => 3, 'type' => 'class', 'name' => "methodName"),
)
Comments class was a controller that actually displayed files with highlighting and comments, allowing you to add and edit comments.And yes, I am fully aware of deficiencies of that code, but I still think the core ideas there are pretty cool.
Not perfect, but here's the project: https://github.com/oneblackbear/phrocco
And here's an example: http://media.oneblackbear.com.s3.amazonaws.com/WaxUrl.html
https://github.com/jquery/jquery/blob/master/test/unit/core....
some sort of block folding would help a lot to follow code progression like a story. i'm not certain this is the best display type for all commenting styles.
It handles multiple languages and keeps your document structure in the navigation.
I would love to see a project (a curated version) like this for Rails.