-
Notifications
You must be signed in to change notification settings - Fork 905
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
Closed
Documentation fixes #3239
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)
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. |
(cherry picked from commit ae3ba2d)
Fixed the merge conflicts and a documentation error introduced by one of the latest check-ins. Should be good to merge. |
Thanks for your contribution, I created a new PR here: #3255 So closing this one |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)