add beforeRequire event
callumlocke opened this issue · comments
Callum Locke commented
There is already a require
event which fires after a successful require (I think?), but I'd like to also have a beforeRequire
event, which would include the external module name. This could be used for timing the load of the external module.
Tyler Kellen commented
Seems good to me! You'll want to emit here:
https://github.com/tkellen/js-liftoff/blob/master/index.js#L27
If you include tests and documentation on the first pass we can probably get a release cut right away.
Takayuki Sato commented
I've sended a pr #92 for this issue.
Now I think it is enough to emit beforeRequire
event only for a module specified with opts.require
by an app user. (So I'll close gulpjs/rechoir#36.)