meh` changed the topic of #opal to: http://opalrb.org - Ruby runtime and library on top of Javascript | 1.0.0 is near | This channel is logged at https://botbot.me/freenode/opal/
dekyl has joined #opal
dekyl has left #opal [#opal]
fkchang has quit [Ping timeout: 255 seconds]
f-3r has joined #opal
f-3r has quit [Changing host]
f-3r has joined #opal
f-3r has quit [Ping timeout: 244 seconds]
e_dub has joined #opal
Liothen has quit [Remote host closed the connection]
Liothen has joined #opal
godd2 has quit [Ping timeout: 260 seconds]
Suabahasa_ has joined #opal
Suabahasa_ has quit [Client Quit]
onnz423 has joined #opal
onnz423 has left #opal ["Poistumisviesti"]
meh` has quit [Ping timeout: 245 seconds]
godd2 has joined #opal
e_dub has quit [Quit: e_dub]
elia has joined #opal
<godd2> Is it possible to get source maps working for static applications?
<godd2> Nevermind, I think I found my answer: "Opal::Environment is a bit lower level and doesn't support source maps by itself."
e_dub has joined #opal
e_dub has quit [Quit: e_dub]
e_dub has joined #opal
e_dub has quit [Quit: e_dub]
e_dub has joined #opal
e_dub has quit [Client Quit]
f-3r has joined #opal
e_dub has joined #opal
e_dub has quit [Client Quit]
professor_soap has joined #opal
<godd2> If Opal::Environment is getting deprecated, what's going to be the way to make static applications?
ceej_irccloud has quit [Ping timeout: 258 seconds]
bcavileer_ has quit [Ping timeout: 244 seconds]
adambeynon_ has quit [Ping timeout: 260 seconds]
professor_soap has quit []
e_dub has joined #opal
xspace has joined #opal
xspace has left #opal [#opal]
adambeynon_ has joined #opal
ceej_irccloud has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
<adambeynon_> godd2: hey
<adambeynon_> Opal::Environment is just a subclass of Sprockets::Environment
<adambeynon_> so in future all you need to do is add each path from Opal.paths() into a sprockets instance
<adambeynon_> thats all Opal::Environment does
<adambeynon_> so, opal-rails does this automatically for you
<adambeynon_> so if youre using sinatra, for example, then you just need to do the same
<adambeynon_> I found that in reality, we were always dealing with an existing sprockets instance, so having our own was just confusing/in the way
bcavileer_ has joined #opal
f-3r has quit [Ping timeout: 252 seconds]
<godd2> oh, okay, awesome!
<godd2> in that case, you can ignore my tweet
elia has joined #opal
e_dub has quit [Quit: e_dub]
<elia> godd2, you can use the builder to generate both the js and map files
<godd2> Okay so this works. Is this what you had in mind? https://gist.github.com/nicklink483/45d700b91b2b1ab22e74
<elia> sure, that works too
f-3r has joined #opal
<elia> godd2, to get the map you can do the following Opal::Processor.source_map_register['opaltest.js']
<elia> errata corrige: Opal::Processor.source_map_register['opaltest']
<elia> godd2, then the result needs to be converted to json before writing it to disk
<elia> (with .to_json)
<elia> adambeynon_, you around?
<adambeynon_> elia: hey. Yeah briefly.
<elia> adambeynon_, just wanted to know if I can rebase the cache branch on master
<elia> just to keep it fresh
<godd2> elia I'm trying all that out now. I'll let you know when I get snagged
<elia> godd2, good, I'll leave in a few moments, but I'll check the logs
elia has quit [Quit: Computer has gone to sleep.]
<godd2> sounds good. Thank you very much
meh` has joined #opal
ylluminate has joined #opal
f-3r has quit [Remote host closed the connection]
f-3r has joined #opal
cpup has quit [Ping timeout: 245 seconds]
cpup has joined #opal
e_dub has joined #opal
<godd2> Alright I got the standalone stuff working, but I'm having trouble understanding elia's instructions on source maps.
<godd2> Here's the proof-of-concept in a gist: https://gist.github.com/nicklink483/45d700b91b2b1ab22e74
<godd2> you can see in the Rakefile the explanation of the problem. Did he mean to run to_json on the result of Opal::Processor.source_map_register ? or of Opal::Processor.source_map_register['opal_test'] ? Or something else?
StephenA1 has joined #opal
StephenA1 has quit [Quit: StephenA1]
<adambeynon_> godd2: yes, so somthing like this (from your example):
<adambeynon_> out << Opal::Processor.source_map_register['opal_test’].to_json
<adambeynon_> Opal::Processor.source_map_register['opal_test’] returns just an instance of SourceMap::Map, so to_json gets it ready for the browser
<godd2> Opal::Processor.source_map_register['opal_test'].class in pry says its a String
<godd2> For the record, I'm using 0.7.0beta3 in ruby 1.9.3 on windows if that makes a difference
<adambeynon_> godd2: let me check
<adambeynon_> godd2: sorry, you are correct
<adambeynon_> yes, so, it should work as per your gist example
<godd2> okay perfect. so what do I do with that map file? I see it loads under the Network tab of Chrome developer tools
CoderPuppy has joined #opal
cpup has quit [Ping timeout: 240 seconds]
f-3r has quit [Remote host closed the connection]
e_dub has quit [Quit: e_dub]