Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gregglind opened this issue Jan 1, 2013 · 2 comments
Open

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

gregglind opened this issue Jan 1, 2013 · 2 comments

Comments

@gregglind
Copy link

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

@olivernn
Copy link
Owner

olivernn commented Jan 3, 2013

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
Copy link
Author

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 added a commit to gregglind/dox-template that referenced this issue Jan 3, 2013
@module and @memberof together are enough to force a tree-like structure
to the document.  However @module requires a `ctx` object to get a
sensible name (from ctx.name).  For the `main` module (and in some other
cases, like weird coding patters, evals, and anywhere else the regex
pased detection in `dox` fails (Moz code like 'const','let', others),
that name will be non-existent or wrong.

Here:

  @module modname

will specify a module name to use.
gregglind added a commit to gregglind/dox-template that referenced this issue Jan 3, 2013
@module and @memberof together are enough to force a tree-like structure
to the document.  However @module requires a `ctx` object to get a
sensible name (from ctx.name).  For the `main` module (and in some other
cases, like weird coding patters, evals, and anywhere else the regex
pased detection in `dox` fails (Moz code like 'const','let', others),
that name will be non-existent or wrong.

Here:

  @module modname

will specify a module name to use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants