Don't publicly document Sprite constructor #67
Merged
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.
This is an attempt to fix #63.
It's a bit tricky, though: documenting the constructor as
@private
actually ends up marking the entire class as private, which prevents Sprite.html from being generated entirely! 😞On top of that, it seemed impossible to add notes to the constructor advising users to use
createSprite()
instead: any documentation I tried adding either didn't show up, or it showed up in the class documentation, which is located waaaaay above the constructor. Meaning that users scrolling down to read the constructor docs likely wouldn't see the note about usingcreateSprite
.So instead, I opted to simply remove the documentation for the constructor. It's still accessible from code, obviously, but it's undocumented now. Which IMO is probably a good thing, as it makes it that much less likely for users to accidentally use the constructor and then get confused when their sprite doesn't show up. However, it also means that there's no comments which help readers of the code understand what arguments the constructor takes. Suggestions welcome!
Oh, another thing: I'm using YUIDoc's
crossLink
helper here to directly link to the documentation forcreateSprite
, but it's actually semi-broken at present due to kevinlacotaco/yuidoc-bootstrap-theme#24. Hopefully we can fix that soon, but at least for now it takes the user to the proper page, where they can manually find thecreateSprite
method on their own.