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

Parse class definition, but ignore it in documentation #210

Open
felipenmoura opened this issue Feb 3, 2014 · 5 comments
Open

Parse class definition, but ignore it in documentation #210

felipenmoura opened this issue Feb 3, 2014 · 5 comments

Comments

@felipenmoura
Copy link

Hi, this is just an idea of a situation a have faced here.
I am developing the company's new framework and using yuidoc.
I have classes like Context, with information that is useful for the future framework users, but it extends ContextSomething, therefore, ContextSomething must be well documented with its comments(this way, its method go into Context). The problem is, the ContextSomething is a class I don't want users to instantiate or even access.

O want the class Context to be listed in the sidebar, including ContextSomething methods, but I don't want the ContextSomething to be listed.
Is there a way to do that, already? Or maybe, is this something other people might find useful as well?

@caridy
Copy link
Member

caridy commented Feb 3, 2014

Hey @felipenmoura long time my dear friend :)

So, about the feature request, it sounds like what you want is just an abstract class, probably by marking the class as @abstract, so you could get a nice class' style of that flag. IIRC we don't have that flag because there is not such thing in javascript, but we could add it for sure. in the meantime, you can do just what we do when it comes to abstracts:

https://github.com/yui/yuidoc/blob/master/tests/input/charts/AxisType.js#L2

That little note stating that the class is abstract might help most developers who knows about abstract.

Aside from that, removing it from the class list is going to be way more difficult. Let's see if I can get a volunteer to implement the abstract flag. :)

@caridy
Copy link
Member

caridy commented Feb 3, 2014

@felipenmoura I went ahead and added the abstract flag. Feel free to test it (from my branch) and let me know if that helps.

@apm
Copy link

apm commented Feb 3, 2014

It could be useful to add a preprocessor config that can modify the raw data payload from the parser before it goes to the doc generator.

@felipenmoura
Copy link
Author

Hi

@caridy, it's great to hear from you :)

I think @abstract could do the job, but it is not exactly what that class is.
A modifier, as indicated by @apm could also be a solution, although I am not sure if it wouldn't be too complicated to use afterwards(if I understood it well).

I am working here on a new theme, if it could be useful, I can share it when it's done.

@caridy
Copy link
Member

caridy commented Feb 5, 2014

@felipenmoura yeah, what @apm is proposing is basically giving you (the theme owner) the ability to define new entries in the parsed data. maybe @abstract is not what you're looking for, maybe it is a @mixin, etc. I will try to set some time to think about this, and I will get back to you next week.

in the meantime, feel free to share the new theme (you have my email address already).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants