Droppe / Loader

Loader: a very simple loader to require() based on glob pattern matching.
5 stars 3 forks source link

Passing the module's filename to the callback #2

Closed AndreasPizsa closed 10 years ago

AndreasPizsa commented 10 years ago

This change passes the module's filename to the callback, which is useful for logging module names.

loader.load('plugins/*.js', function(exports,filename){
  console.log('Loaded ' + filename);
}
AndreasPizsa commented 10 years ago

Hi @Iheartweb , I changed loader.load to also pass the current module's filename to the callback, which I found to be helpful for logging. Can you please merge this in? Thank you :)

Iheartweb commented 10 years ago

Almost perfect. Please update the readme as well.

AndreasPizsa commented 10 years ago

@Iheartweb done!

Iheartweb commented 10 years ago

Thanks. I'll publish it in the morning

On Sunday, August 24, 2014, Andreas Pizsa notifications@github.com wrote:

@Iheartweb https://github.com/Iheartweb done!

— Reply to this email directly or view it on GitHub https://github.com/Droppe/Loader/pull/2#issuecomment-53181929.

AndreasPizsa commented 10 years ago

Thanks, @Iheartweb !

Iheartweb commented 10 years ago

Sorry for the lateness.