dox-template icon indicating copy to clipboard operation
dox-template copied to clipboard

feature request: non-module docs should appear somewhere.

Open gregglind opened this issue 12 years ago • 2 comments

Even in Davis.js, the non-module functions don't appear in the docs.

gregglind avatar Jan 01 '13 20:01 gregglind

What do you mean by 'non-module' docs?

I have run into problems trying to get some functions documented when they are inside a closure or specified in a way which dox has problems with.

I think the way I worked around this is to make use of the @memberOf tag and the @module tag. This associates a function with a module which should make the template display it correctly, there is an example here .

olivernn avatar Jan 03 '13 12:01 olivernn

I feel foolish. I actually implemented a @parent string tag, which is exactly the same as @memberOf.

A few nits remain:

  1. @module implies a ctx, and gets its name from that.

Solution 1:

template.js:  `modules.unshift({name:"main"});  // always have a 'main', which can be used by `@memberOf`

Solution 2:

modify @module to a two-arg, and allow `@module modname` to be the name, if it exists.

I like that better, because it's more explicit.

gregglind avatar Jan 03 '13 16:01 gregglind