These are chat archives for opal/opal

12th
Mar 2016
CJ Lazell
@cj
Mar 12 2016 18:01
afternoon.... anyone tried getting hot reloading working with opal and webpack?
I have it working. but I have to manually refresh the browser....can't seem to get the hot reloading part to work, so it just replays the file that was modified
CJ Lazell
@cj
Mar 12 2016 18:13
ok, got it trying to hot reload "The following modules couldn't be hot updated: (They would need a full reload!)"
guess i need to play with the opal-loader code :)
any chance the opal cdn could be updated with 0.9.2?
Jamie Gaskins
@jgaskins
Mar 12 2016 18:22
@cj I've gotten hot loading of Clearwater apps working before, but that wasn't with Webpack. It was my own homegrown faye-websocket / listen.rb thing that compiles the file you just saved, sends it over the websocket, and the client evals it and Clearwater re-renders all apps. I haven't published it yet because it still has a few bugs that cause the hot loading not to work. I should do that this weekend.
CJ Lazell
@cj
Mar 12 2016 18:24
interesting, would love to see that
I should be able to get it working with webpack... just need to go through the opalrb-loader code
CJ Lazell
@cj
Mar 12 2016 18:40
sooooo I have it working
George Plymale II
@ylluminarious
Mar 12 2016 19:02
@cj :+1:
CJ Lazell
@cj
Mar 12 2016 19:25
wow... it's insainly easy to do
works with required files too
you should be able to see it live update
Forrest Chang
@fkchang
Mar 12 2016 20:45
@cj interesting, aside from using ROda, how is it functionally different than the examples in https://github.com/zetachang/opalrb-loader/tree/master/examples -- on a side note, I'm long due to write a blog post explaining how to use webpack w/opal and react.rb to pull in npm modules to use those "transparently" in opal
I'd love to combine the 2 and make some sort of generator
CJ Lazell
@cj
Mar 12 2016 20:46
it's different in the fact that this will live reload the code in the browser, without the need for a refresh
so if you make a change in the code, it will instantly reflect in the browser with almost 0 latency
CJ Lazell
@cj
Mar 12 2016 20:52
@fkchang I can show you if you like
it even works as you create new files thanks to webpack :D
Martin Becker
@Thermatix
Mar 12 2016 22:04
what does this hot-reloading thing do?
CJ Lazell
@cj
Mar 12 2016 22:04
hot reloads the opal code in the browser without refreshign
let me know when you're looking and I'mm odifie the world.rb file, which is nested
Martin Becker
@Thermatix
Mar 12 2016 22:06
could I use it to load code remotly?
CJ Lazell
@cj
Mar 12 2016 22:06
?
Martin Becker
@Thermatix
Mar 12 2016 22:06
nvm
CJ Lazell
@cj
Mar 12 2016 22:43
anyone from opal around?