gulpjs / liftoff

Launch your command line tool with ease.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add beforeRequire event

callumlocke opened this issue · comments

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.

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.

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.)