olivernn / dox-template

simple templates for dox
29 stars 4 forks source link

feature request: non-module docs should appear somewhere. #5

Open gregglind opened 11 years ago

gregglind commented 11 years ago

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

olivernn commented 11 years ago

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 .

gregglind commented 11 years ago

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.