These are chat archives for opal/opal

24th
Mar 2015
CJ Lazell
@cj
Mar 24 2015 17:19
afternoon, is there anyway to do this? Opal::Builder.build(path, { source_map: true}) ?
well Opal::Builder.build(path, { debug: true, source_map: true}) ?
it's always on
but not very reliable (there's an issue with the concatenation of multiple maps)
Ryan Stout
@ryanstout
Mar 24 2015 17:27
@elia how are you?
Elia Schito
@elia
Mar 24 2015 17:30
bit tired, as usual, but good :)
@ryanstout you fine? how the conf?
Ryan Stout
@ryanstout
Mar 24 2015 17:30
@elia it was good, too bad you couldn't make it :-)
@elia sorry I haven't had time to help with the sourcemap stuff, I'm hoping to find some more time to test soon. Did I see you are switching back to sprockets?
CJ Lazell
@cj
Mar 24 2015 17:32
@elia thank you for the response... I know how to get the source map code, I just wanted the generated javascript to append the #map stuff to the end i.e. when you do Opal::Server.new { |s| s.debug = true; s.source_map = true}
I guess that's just a thing from opal server... I can just append the source_maps code to the end of the javascript code I guess
CJ Lazell
@cj
Mar 24 2015 17:52
@elia why when I use mappings do I get this error http://i.imgur.com/N9pcZZJ.png ? If I don't include the .map the js doesn't throw an error
CJ Lazell
@cj
Mar 24 2015 18:08
nm, I have it working now :) thank you again
Elia Schito
@elia
Mar 24 2015 18:08
About the map magic comment the builder doesn't know how you'll serve the map so it cant know its path
Anyway maps with builder are kinda broken due to concatenation, the issues should be solved in master
if you're using sprockets
@ryanstout not coming was the right decision after all as we had to bring the baby to the hospital that Sunday
CJ Lazell
@cj
Mar 24 2015 18:12
@elia so I'd have to be using sprockets for maps to be 100%?
Elia Schito
@elia
Mar 24 2015 18:12
(she's ok now)
Ryan Stout
@ryanstout
Mar 24 2015 18:13
@elia sorry to hear that. Glad to hear everything is ok.
Elia Schito
@elia
Mar 24 2015 18:13
@cj yes sprockets on master seem to work fine, it's a rails app?
CJ Lazell
@cj
Mar 24 2015 18:15
Elia Schito
@elia
Mar 24 2015 18:17
Ok so in addition to retrieving an asset from sprockets you need to bootstrap it
@cj have a look at the opal_helper in Opal-rails master
CJ Lazell
@cj
Mar 24 2015 18:18
@elia so build.source_map in master won't have the correct mappings?
Elia Schito
@elia
Mar 24 2015 18:21
It has the same broken mapping it had before
Elia Schito
@elia
Mar 24 2015 18:25
Possibly, the merge is pretty recent and the examples are the first being left behind
Try looking at Opal-rails engine.rb to have an example on how to integrate in rack
CJ Lazell
@cj
Mar 24 2015 18:31
@elia man this is a lot more complicated that I thought lol... I'll take a look and try to make a basic rack example
Elia Schito
@elia
Mar 24 2015 18:43
I'm on mobile other wise I'd be more precise sorry
search the file for "rout" as in routing
thats the part regarding rack
CJ Lazell
@cj
Mar 24 2015 18:54
@elia no worries, thank you for all your help