00:30
dekyl has joined #opal
00:30
dekyl has left #opal [#opal]
01:40
fkchang has quit [Ping timeout: 255 seconds]
03:27
f-3r has joined #opal
03:27
f-3r has quit [Changing host]
03:27
f-3r has joined #opal
03:44
f-3r has quit [Ping timeout: 244 seconds]
04:08
e_dub has joined #opal
04:19
Liothen has quit [Remote host closed the connection]
04:25
Liothen has joined #opal
04:27
godd2 has quit [Ping timeout: 260 seconds]
06:07
Suabahasa_ has joined #opal
06:07
Suabahasa_ has quit [Client Quit]
06:30
onnz423 has joined #opal
06:30
onnz423 has left #opal ["Poistumisviesti"]
08:10
meh` has quit [Ping timeout: 245 seconds]
11:36
godd2 has joined #opal
11:54
e_dub has quit [Quit: e_dub]
12:51
elia has joined #opal
13:14
<
godd2 >
Is it possible to get source maps working for static applications?
13:20
<
godd2 >
Nevermind, I think I found my answer: "Opal::Environment is a bit lower level and doesn't support source maps by itself."
13:41
e_dub has joined #opal
13:53
e_dub has quit [Quit: e_dub]
14:40
e_dub has joined #opal
14:54
e_dub has quit [Quit: e_dub]
14:58
e_dub has joined #opal
14:59
e_dub has quit [Client Quit]
15:01
f-3r has joined #opal
15:16
e_dub has joined #opal
15:20
e_dub has quit [Client Quit]
15:43
professor_soap has joined #opal
16:03
<
godd2 >
If Opal::Environment is getting deprecated, what's going to be the way to make static applications?
16:46
ceej_irccloud has quit [Ping timeout: 258 seconds]
16:47
bcavileer_ has quit [Ping timeout: 244 seconds]
16:48
adambeynon_ has quit [Ping timeout: 260 seconds]
16:49
professor_soap has quit []
17:07
e_dub has joined #opal
17:17
xspace has joined #opal
17:17
xspace has left #opal [#opal]
17:40
adambeynon_ has joined #opal
17:50
ceej_irccloud has joined #opal
17:56
elia has quit [Quit: Computer has gone to sleep.]
17:57
<
adambeynon_ >
godd2: hey
17:57
<
adambeynon_ >
Opal::Environment is just a subclass of Sprockets::Environment
17:57
<
adambeynon_ >
so in future all you need to do is add each path from Opal.paths() into a sprockets instance
17:57
<
adambeynon_ >
thats all Opal::Environment does
17:57
<
adambeynon_ >
so, opal-rails does this automatically for you
17:58
<
adambeynon_ >
so if youre using sinatra, for example, then you just need to do the same
17:58
<
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
18:02
bcavileer_ has joined #opal
18:02
f-3r has quit [Ping timeout: 252 seconds]
18:05
<
godd2 >
oh, okay, awesome!
18:08
<
godd2 >
in that case, you can ignore my tweet
18:10
elia has joined #opal
18:16
e_dub has quit [Quit: e_dub]
18:24
<
elia >
godd2, you can use the builder to generate both the js and map files
18:24
<
elia >
sure, that works too
18:25
f-3r has joined #opal
18:27
<
elia >
godd2, to get the map you can do the following Opal::Processor.source_map_register['opaltest.js']
18:27
<
elia >
errata corrige: Opal::Processor.source_map_register['opaltest']
18:28
<
elia >
godd2, then the result needs to be converted to json before writing it to disk
18:28
<
elia >
(with .to_json)
18:29
<
elia >
adambeynon_, you around?
18:30
<
adambeynon_ >
elia: hey. Yeah briefly.
18:31
<
elia >
adambeynon_, just wanted to know if I can rebase the cache branch on master
18:31
<
elia >
just to keep it fresh
18:32
<
godd2 >
elia I'm trying all that out now. I'll let you know when I get snagged
18:32
<
elia >
godd2, good, I'll leave in a few moments, but I'll check the logs
18:32
elia has quit [Quit: Computer has gone to sleep.]
18:32
<
godd2 >
sounds good. Thank you very much
18:50
meh` has joined #opal
19:04
ylluminate has joined #opal
19:12
f-3r has quit [Remote host closed the connection]
19:18
f-3r has joined #opal
19:43
cpup has quit [Ping timeout: 245 seconds]
19:43
cpup has joined #opal
19:58
e_dub has joined #opal
20:01
<
godd2 >
Alright I got the standalone stuff working, but I'm having trouble understanding elia's instructions on source maps.
20:02
<
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?
20:24
StephenA1 has joined #opal
20:41
StephenA1 has quit [Quit: StephenA1]
21:42
<
adambeynon_ >
godd2: yes, so somthing like this (from your example):
21:42
<
adambeynon_ >
out << Opal::Processor.source_map_register['opal_test’].to_json
21:43
<
adambeynon_ >
Opal::Processor.source_map_register['opal_test’] returns just an instance of SourceMap::Map, so to_json gets it ready for the browser
21:48
<
godd2 >
Opal::Processor.source_map_register['opal_test'].class in pry says its a String
21:51
<
godd2 >
For the record, I'm using 0.7.0beta3 in ruby 1.9.3 on windows if that makes a difference
21:53
<
adambeynon_ >
godd2: let me check
21:54
<
adambeynon_ >
godd2: sorry, you are correct
21:54
<
adambeynon_ >
yes, so, it should work as per your gist example
21:55
<
godd2 >
okay perfect. so what do I do with that map file? I see it loads under the Network tab of Chrome developer tools
22:05
CoderPuppy has joined #opal
22:05
cpup has quit [Ping timeout: 240 seconds]
22:51
f-3r has quit [Remote host closed the connection]
22:58
e_dub has quit [Quit: e_dub]