views:

45

answers:

1

Hi,

I'm in the process of generating API docs for an in-house web app that's undergoing some expansion. It's a DHTML project, with a mix of both some OO and mostly procedural PHP, and purely procedural Javascript. At the moment, it's pretty much all documented for the appropriate doc generators (phpdocumentor and jsdoc), but the two were never "connected". I could go through and add manual link statements to the doc blocks, but managing all those links (like "../jsdoc/filename.html#function) is a real pain.

Any suggestions for documentation generators that handle both PHP and JavaScript, and allow something like @see functionName between languages?

If worst comes to worst, I can hack together a script to rewrite LINK URLs from some magic syntax (i.e. js: and php:), but I'd really rather have something that will allow a unified tree view of everything.

Thanks, Jason

A: 

After looking at a number of options, I wrote a PHP script that parses JS files, pulls out the doc blocks and function definitions, and then writes it to a file that phpdoc can process. It just needs one line added to phpDocumentor.ini so it will parse .js files.

The blog post talking about it is at: http://blog.jasonantman.com/2010/08/documentation-generation-for-web-apps-php-and-javascript/ And the script is at: http://svn.jasonantman.com/misc-scripts/

Jason Antman