[Helma-user] New helmadoc/jsdoc based reference

Chris Zumbrunn chris at zumbrunn.com
Thu Mar 8 15:57:49 CET 2007


On Mar 8, 2007, at 14:58 , <tobias.schaefer at orf.at> wrote:

> 1. running jsdoc as ant task
>
> stefan pollach has solved this issue and we included it in jala's  
> hopkit. it provides defining tasks in javascript and pre-processes  
> the code files to reduce jsdoc hic-ups to a minimum. you can find  
> all necessary information in the source code of hopkit's lib.xml [1].

Ok, I'll go take a closer look.

> 2. eliminating the global constructor
>
> actually, i am not sure why you're doing this, anyway. simply  
> defining the global functions as is (ie. without defining a  
> "global" constructor function and prefixing any global function  
> with "global.") should give you more reasonable output.
>
> as an example you might take a look at this url:
> http://p3k.org/source/lib3k/trunk/docs/Global.html
>
> the naming of the global "class" can be manipulated with jsdoc's -- 
> globals-name parameter.

I'm not 100% sure I know what you mean, but I think the reason why I  
used the syntax with the "global." prefix for global methods and  
defined the built-in global objects as individual  objects (not sub  
properties of global) was to create reasonable output using helmadoc  
in the manage app.

Or if you mean the pseudo constructors I added as properties to the  
"global" object, these were only added so that the built-in objects  
show up on the "global" page in the jsdoc output.

> 3. objects without an actual constructor
>
> to avoid having non-existent constructor references for app, req,  
> res etc. in the jsdoc output you can use global functions together  
> with jsdoc's @member tag and then remove the constructor function  
> from your "pseudo"-code:
>
> /**
>  * Description of the method
>  * ...
>  * @member app
>  */
> function methodName(/* ... */) {
>    //...
> };
>
> using such constructs with jsdoc you won't get any constructor in  
> the output anymore. the link text in the left frame ("All Classes")  
> will be the same as what you put after @member ("app" in this case).

If I remember correctly, I define these constructors twice. I might  
need the pseudo constructor so that JSDoc ignores the second  
definition that is intended for helmadoc or vice versa, don't  
remember.... I'll look into it again right now.

Chris




More information about the Helma-user mailing list