Skip to content

Documentation fixes #3239

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

Closed
wants to merge 7 commits into from
Closed

Conversation

TimMensch
Copy link
Contributor

A whole pile of (mostly? I'm hoping?) non-controversial documentation fixes.

I am running jsdoc 3.0 on the doc tree to produce a FlowType declaration file (for static type analysis of JavaScript code). The docs are actually quite awesome in how much information they provide; considering how much of the documentation Just Worked, this really isn't that many bugs.

Some of the changes were because FlowType threw an error because an inherited class member function signature didn't match the signature of the same function in an ancestor class. Many of the changes were just random typos. A couple of changes (like delete window._tmpCanvas1 in CCBoot) were because jsdoc 3.0 was throwing an error and wouldn't read the file without the fix. You should take a look at the jsdoc 3.0 output, by the way; it's very nice.

I may have other similar pull requests in the future as I use Cocos2d/html more, and I find more of the documentation that needs to be fixed. In general I think this will just help the docs.

Let me know if you want me to actually submit text documentation changes. I could probably be encouraged to document bits of the code as I use them. I wrote an entire 500+ page book on an older (now dead) game SDK using Doxygen/JavaDoc style docs, just documenting things as I went, so it's become a bit of a habit.

(cherry picked from commit ec06396)
(cherry picked from commit a9909bb)
(cherry picked from commit 4a1839f)
(cherry picked from commit 5526087)
(cherry picked from commit 543b891)
(cherry picked from commit 94ee8d9)

A whole pile of (mostly?) non-controversial documentation fixes.

I am running jsdoc 3.0 on the doc tree to produce a FlowType declaration file (for static type analysis of JavaScript code). The docs are actually quite awesome in how much information they provide; considering how much of the documentation Just Worked, this really isn't that many bugs.

Some of the changes were because FlowType noticed that an inherited class member function signature didn't match the signature of the same function in an ancestor class. Many of the changes were just random typos.

I may have other similar pull requests in the future as I use Cocos2d/html more, and I find more of the documentation that needs to be fixed. In general I think this will just help the docs.

Let me know if you want me to actually submit *text* documentation changes. I could probably be encouraged to document bits of the code as I use them. I wrote an entire 500+ page book on an older (now dead) game SDK, just documenting things as I went, so it's become a bit of a habit.

(cherry picked from commit ec06396)
(cherry picked from commit a9909bb)
(cherry picked from commit 4a1839f)
(cherry picked from commit 5526087)
(cherry picked from commit 543b891)
(cherry picked from commit 94ee8d9)
* Added properties to Point, Size, and Rect.
* Fixed Sprite constructor to properly note an optional parameter.

(cherry picked from commit 3a4bf7e)
* Add constants to cc.game
* Make addSpriteFrames texture parameter optional (and fix the docs)
* Add a "cc.Loader" class that cc.loader is a member of. This way cc.loader can be an instance, so the cc.Loader members don't need to be static.
* Add docs for cc.loader.resPath, .audioPath, and .cache.
* Add docs for cc.game.onResize, and note that .onStart and .onStop can be null.

(cherry picked from commit 063edc4)
(cherry picked from commit aab335a)
(cherry picked from commit fc95a78)
@TimMensch
Copy link
Contributor Author

Since this still hasn't been pulled, I'm going to keep pushing doc fixes into the same pull request until you let me know I should do otherwise.

@TimMensch
Copy link
Contributor Author

Fixed the merge conflicts and a documentation error introduced by one of the latest check-ins. Should be good to merge.

@pandamicro
Copy link
Contributor

Thanks for your contribution, I created a new PR here: #3255

So closing this one

@pandamicro pandamicro closed this Apr 5, 2016
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

Successfully merging this pull request may close these issues.

2 participants