-
Notifications
You must be signed in to change notification settings - Fork 75
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
Improve documentation (Tutorials, API documentation etc.) #448
Comments
There are two big things that should happen for documentation.
|
@jbeezley are you suggesting we create RTD manually (vs parsing the source code like we do right now?).
I have slightly different view. Talking with some other folks including @danlamanna, I am thinking that we should follow D3 like API documentation which I don't think comes from the source code. Does it? |
We do create RTD manually. Only the API docs come from the source.
I don't like having the API documentation in a separate place. D3 doesn't use embedded docstrings. IMO, that makes the source code hard to read. Other popular libraries use jsdoc effectively. For example, glmatrix uses it with a very simple custom template, openlayers uses jsdoc with a highly customized template. I also recently found documentationjs which is compatible with jsdoc style docstrings. As it is, we have a hard enough time writing and keeping the embedded docstrings up to date. If we move them elsewhere, it will be orders of magnitude more difficult. |
Ah, I see. I haven't looked at the doc. thanks for the update.
that's a good point. Can we not use these templates? @dcjohnston what you think? |
We could base ours off of those templates, but my guess is that they are highly customized to the code they document. |
ah, I see. Worth investigating? In the mean time, I will add start adding some manual documentation (basic things) for RTD |
|
I think we are waiting for a example JS source file for improving the API documentation. @jbeezley any chance you can have one for us next week? |
I'm working on integrating the template at https://github.com/davidshimjs/jaguarjs-jsdoc. This is the same template that openlayers uses and provides pretty good out of the box usability with minimal changes to our current docstrings. |
sounds great @jbeezley looking forward to it. |
As mentioned in #697, here is a list of things we should check for in each file:
I think it would also be nice to remove the immediately invoked functions since they are no longer necessary for commonjs modules. |
When documenting events, we end up with a title like |
On our getter/setter routines where we return either the current value or the class instance, should the return type be |
Events names are usually just strings and don't typically have namespaces. For example, you would link to a As far as getters/setters, I don't have a strong opinion. I guess |
In the geojs examples, we refer to events via a namespace, e.g. |
My slight preference is for this (namespace) as I think that would be more useful for the developers but i am open on it. |
{number|this} sounds good to me as it is general as well. |
Tolerate no warnings from eslint. Fix a few minor other jsdoc issues. This is the last PR necessary to resolve #448.
Tolerate no warnings from eslint. Fix a few minor other jsdoc issues. This is the last PR necessary to resolve #448.
We have gallery which is great, but we are missing tutorials for example. @nicopresto @jbeezley @dcjohnston what you think?
The text was updated successfully, but these errors were encountered: