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

Decouple from socket.io #105

Closed srolel closed 8 years ago

srolel commented 8 years ago

I'm doing a small app with Electron, and successfully integrated systemjs with hot reloading, but I had to refactor out the code that deals with sockets in both the client and server scripts, and instead use a simple emitter to connect them rather than a socket, since in electron you can have the UI code and server code in the same runtime. I'd like to submit a PR that decouples the current code from socket.io, if it's something you think is desirable.

capaj commented 8 years ago

Definitely.

alexisvincent commented 8 years ago

@Mosho1 Checkout https://github.com/alexisvincent/systemjs-hmr, capaj/systemjs-hot-reloader should be switching to using this in the next few days or so.

It provides HMR via a System.reload('some/module') extension.

Have a look at #107 to see how to use it.

born2net commented 8 years ago

is there anything different we need to do to our current setup to use the new hmr? I am using angular2

regards

Sean

alexisvincent commented 8 years ago

@born2net please note, SystemJS-hmr is not suppost to be used by application developers. Sorry for that confusion. This project will transparently use it under the hood. The only issue will be if you use a lot of the internal hooks. If not you won't even notice the change

born2net commented 8 years ago

got it, tx...!

Sean