tapable icon indicating copy to clipboard operation
tapable copied to clipboard

Hook Descriptions

Open skipjack opened this issue 8 years ago • 1 comments

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.

skipjack avatar Feb 07 '18 05:02 skipjack

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.

EECOLOR avatar Apr 08 '18 20:04 EECOLOR