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

jsdoc-style documentation for 'collection' methods #1090

Closed
wants to merge 12 commits into from
Closed

jsdoc-style documentation for 'collection' methods #1090

wants to merge 12 commits into from

Conversation

hargasinski
Copy link
Collaborator

Converted documentation from README to jsdoc-style for respective methods. Currently, only done for 'collection' methods.

This is currently not ready to be merged, I have a couple of questions I posted in the discussion for #1083.

Converted documentation from README to jsdoc-style for respective
methods. Currently, only done for 'collection' methods.
@megawac
Copy link
Collaborator

megawac commented Mar 29, 2016

That is a lot of progress! I'll review where you're at tomorrow night. Thanks!

Only the base functions now contain an example, while the `series` and
`limit` versions simply contain a reference to the base function. Fixed
styling issue and misspelled tag.
@hargasinski
Copy link
Collaborator Author

@megawac I fixed the issues brought up, and I also added the @name tag. For now, I kept the function parameters as is, without using the @callback or @typedef. Let me know what to change, and when you give me the green light, I'll add the documentation for the remainder of the methods, rebase, and squash the commits. Thanks!

* @static
* @memberof async
* @memberOf async
* @see async.concat
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on using @see over lodashs method. In lodash docs as I understand, anything in code tags with the same @memberof tag automagically links to that method.

So it would be something like

see async.concat

I'm fine with either approach, lodash's just seems a bit more flexible when multiple methods are linked
/cc @aearly @jdalton

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated it to use code tags.

/master'

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
remaining `Control Flow` methods to document:
- queue
- priorityQueue
- cargo
- auto
- autoInject
- retry
- retryable
- iterator
- times, timesSeries, timesLimit
- race
remaining `Util`  methods to document (10):
- ensureAsync
- constant
- asyncify
- wrapSync
- log
- dir
- noConflict
- timeout
- reflect
- reflectAll
need to rebase to master before I can document the recently added
reflect functions
documented the new `reflect` and `reflectAll` functions
@hargasinski
Copy link
Collaborator Author

I didn't touch the detectLimit method between ff1e180 and 1f12a4f, so I don't know what could have caused it to fail. The timeout for mocha test for detectLimit did get shortened though.

@hargasinski
Copy link
Collaborator Author

Note: currently, I only have the Control Flow methods mentioned in the description of 971d240 left to document.

this should be the last of the public methods requiring documentaiton
added module documentation to index.js and documentated missed method
setImmediate (copied from nextTick).
@hargasinski
Copy link
Collaborator Author

@megawac this branch should be ready to merge, all of the methods are documented, except for transform since it wasn't included in the README. Is there anything you want me change before I do a final rebase and then squash the commits?

@megawac
Copy link
Collaborator

megawac commented Apr 12, 2016

Amazing. I'll review over lunch! (And i'll work on generating docs over the coming weekend)

Thanks so much @hargasinski. Also

@megawac
Copy link
Collaborator

megawac commented Apr 12, 2016

Also, don't worry about squashing your commits. I'll mange it when I merge

@hargasinski
Copy link
Collaborator Author

Thanks for the quick reply! It should be ready to merge, I rebased and resolved the
conflicts not too long ago. If you need help with site generation, let me
know.

On Tue, Apr 12, 2016 at 8:32 AM, Graeme Yeates notifications@github.com
wrote:

Also, don't worry about squashing your commits. I'll mange it when I merge


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1090 (comment)

/**
* Determines the best order for running the functions in `tasks`, based on
* their requirements. Each function can optionally depend on other functions
*nbeing completed first, and each function is run as soon as its requirements
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

little typo artificat here

* @category Util
* @param {Function} function - The function you want to eventually apply all
* arguments to. Invokes with (arguments...).
* @param {...*} arguments... - Any number of arguments to automatically apply
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind disregard this message. It was for issues in some of the other files (log.js) where the param was {..*}, missing a dot


Is this the way it should be defining this? /cc @jdalton

This appears to be the only thing being parsed incorrectly at the moment using jscs-jsdoc (see 3bec241)

http://stackoverflow.com/questions/4729516/correct-way-to-document-open-ended-argument-functions-in-jsdoc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's how I do it.
You can try hacking around the issue with things like {...(*)} or {(...*)} or smth.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try hacking around the issue with things like {...(*)} or smth.

@megawac
Copy link
Collaborator

megawac commented Apr 12, 2016

Merged in 982674c...6ed90c6 (for some reason the commit messages are showing up wrong in the compare view. See https://github.com/caolan/async/commits/master)

@megawac megawac closed this Apr 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants