elia has quit [Quit: (IRC Client: textualapp.com)]
elia has joined #opal
elia has quit [Client Quit]
elia has joined #opal
automationaddict has joined #opal
tils has joined #opal
<adambeynon>
elia: I forget, how do I require javascript files using the new builder? (it keeps trying to parse it as ruby)
<elia>
yeah, you need to explicitly use .js
<elia>
but I'd like to get rid of that
<adambeynon>
ahh right. forgot about that :)
<elia>
and maybe teach the path reader to detect mime type
<elia>
at the cost of reinventing sprockets… :(
<adambeynon>
elia: I did think of another way to possibly handle the requires. When we encounter a require() directive inside a ruby file (compiler.requires) then we could add that to the sprockets env (environment.opal_requires = Set.new), so when we actually compile a ruby file inside the processor, If it is in that list of required files, then we could wrap it inside
<adambeynon>
the Opal.modules stuff
<adambeynon>
that way, the "main" file would compile as-is, and only required files would be registered
<adambeynon>
as you say, fighting against sprockets might cause issues
<elia>
adambeynon, i fear that would be fighting against sprockets really
<elia>
adambeynon, it surely fights with sprockets cache
<elia>
and probably with having multiple sprockets "manifest" (main) files
<elia>
which I'm quite sure is the case for many ppl
<elia>
adambeynon, another (ugly) way is to wrap everything and then ask ppl to Opal.require the main file from JS
<adambeynon>
thats true
<adambeynon>
elia: that could be a good solution - thing is, we could be flexible - offer the old style, and the wrapped style as a config option
<adambeynon>
although
<adambeynon>
well
<adambeynon>
no, thats probably silly
<elia>
adambeynon, I think that if we take the burden to duplicate (for the good) some functionalities of sprockets we can get the best out of both worlds (being manifest vs. wrapping)
<elia>
adambeynon, and if the work is done the right way when we're in the context of sprockets we can link to it for file retrieval, cache, paths, etc.
<elia>
adambeynon, I think we'll need to introduce something on the lines of the Asset class from sprockets, that knows it's mime, real path, logic path
elia has quit [Quit: Computer has gone to sleep.]
dimaursu16 has quit [Ping timeout: 252 seconds]
elia has joined #opal
automationaddict has quit [Ping timeout: 240 seconds]
dimaursu16 has joined #opal
<adambeynon>
elia: do you think there is any way that we can get sprockets to serve up each file individually as well? (they are currently being concatenated using new builder)
<elia>
adambeynon, right, that's another issue
<elia>
adambeynon, I don't think it's possible afaik, unless we find some hacky trick :)
<elia>
talking about that a middleware could handle the main and have sprockets serving only wrapped stuff
<elia>
I think sass serves a single file when using @import over #=require
dimaursu16 has quit [Ping timeout: 252 seconds]
<elia>
adambeynon, …
<elia>
maybe you're right
<elia>
what if we store the main in the context
<elia>
instead of storing the deps
<elia>
we probably still need to fix the cache
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
dimaursu16 has joined #opal
ryanstout has joined #opal
elia has quit [Ping timeout: 240 seconds]
dimaursu16 has quit [Read error: Operation timed out]
fkchang has joined #opal
ch007m has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dimaursu16 has joined #opal
ShoeSuedeBlues has joined #opal
[o__o] has quit [Ping timeout: 252 seconds]
ShoeSuedeBlues has quit [Quit: ShoeSuedeBlues]
ShoeSuedeBlues has joined #opal
elia has joined #opal
[o__o] has joined #opal
ShoeSuedeBlues has quit [Quit: ShoeSuedeBlues]
ch007m has joined #opal
mieko has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
ch007m has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]