pirelenito / git-revision-webpack-plugin

🏗 Webpack plugin that generates VERSION and COMMITHASH files during build
https://www.npmjs.com/package/git-revision-webpack-plugin
MIT License
358 stars 48 forks source link

Allow commithash and version to take an optional callback to be passed to runGitCommand #12

Closed dwayne closed 7 years ago

dwayne commented 7 years ago

runGitCommand can take a callback, see here. But, we don't allow one to be passed along, see here.

pirelenito commented 7 years ago

That is fine, then it just runs synchronously. Do you have a requirement to have it running asynchronously?

dwayne commented 7 years ago

@pirelenito No requirement. Just something I noticed when I was trying to handle an error. That there is no way to do it asynchronously even though the underlying function takes a callback. So I felt like mentioning it for completeness.

pirelenito commented 7 years ago

That is an implementation detail that is not documented, and since these functions were designed to be used while constructing Webpack configurations, they will most likely will be called synchronously.

Thanks for getting in touch,

Cheers