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

Hook Descriptions #48

Open
skipjack opened this issue Feb 7, 2018 · 1 comment
Open

Hook Descriptions #48

skipjack opened this issue Feb 7, 2018 · 1 comment

Comments

@skipjack
Copy link

skipjack commented Feb 7, 2018

In regards to webpack/webpack.js.org#1754 and this comment.

The documentation on the next branch of webpack.js.org now points to this package and it's readme more prominently. In standardizing and updating the new v4 hook documentation, I used this repo's README a lot. I found most of it very helpful, but the actual hook types still feel a bit mysterious.

Now that we note each hook type in the description of each hook, it would be great if users could come over here to learn more about the different types of hooks and what the do (besides just sync vs async). Something like the following for each hook would be fantastic:

SyncHook

Creates a hook that is executed synchronously... (etc.)

Methods: tap

I'd be happy to help with grammar or clarification if needed.

@EECOLOR
Copy link

EECOLOR commented Apr 8, 2018

Yeah, and this is even more important than previously because the code (while more efficient) is very hard to understand.

What I would want to know is what the result of call, callAsync and promise is. It seems that for bail the first hooks result is returned. And that waterfall uses the result from the previous hook as the argument for the next.

Oh and it's also important to know for what hooks returning a value from the tapX function has an effect.

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

No branches or pull requests

2 participants