alexisvincent / systemjs-hot-reloader

reloads your modules as needed so that you can have satisfyingly fast feedback loop when developing your app
MIT License
228 stars 36 forks source link

Adding option to disable logging to the console #120

Closed joeldenning closed 7 years ago

joeldenning commented 7 years ago

See https://github.com/alexisvincent/systemjs-hmr/pull/14, which is code that is waiting to be published in systemjs-hmr. Until that is published, this pull request should not be merged.

This simply exposes a new function setDebugLogging that allows the user to turn of logging things to the console. Note that when this project migrates to the next.js of systemjs-hmr, that this function will no longer be exported from systemjs-hmr. So potentially it would cause a breaking change for those who are using the function but then upgrade to systemjs-hmr@next.

alexisvincent commented 7 years ago

@joeldenning Thanks for this! Note, that upgrading to systemjs-hmr@next is going to be a breaking change anyway :) Since the whole state hydration mechanism is different.

peteruithoven commented 7 years ago

Wait, I didn't see this console.logging code, but why not use a package like debug? That's way more flexible and used by a lot of other libraries. Although, more in Node.js than on the client side.

alexisvincent commented 7 years ago

@peteruithoven Sure, all the same to me really, since this is the old version. Want to send a PR?