These are chat archives for jescalan/roots

4th
Aug 2014
Tobias Birmili
@toabi
Aug 04 2014 13:48
Hum, symlinks. I need to share assets between two projects. I tried to symlink them into the right location, but weird things happen.
Weird as in: The absoulte path of the symlink is copied to public, like public/Users/toabi/some/path.
Tobias Birmili
@toabi
Aug 04 2014 14:27
And why does assets_folder: '../foo' in app.coffee not work? https://github.com/jenius/roots/blob/master/lib/config_parser.coffee#L63
Tobias Birmili
@toabi
Aug 04 2014 14:48
@jenius do you have any ideas?
Jeff Escalante
@jescalan
Aug 04 2014 14:58
for symlinks, im not sure. never run into a situation like that before
hi @toabi!
as far as the assets_folder thing, why are you going up a level as the path?
also if you are working with roots a lot have you considered switching to v3?
v2 is not currently in development at all
Tobias Birmili
@toabi
Aug 04 2014 14:59
because I want a shared assets folder between two roots projects
and symlinks did not work
Jeff Escalante
@jescalan
Aug 04 2014 14:59
oh... yeah thats pretty challenging
i think probably working on getting symlinks working would be the best route?
everything is relative to the root
Tobias Birmili
@toabi
Aug 04 2014 15:00
well, I did consider switching to v3 but right now "everything" except shared assets is working in v2 nicely
and when I have more time I'll try out switching to v3^^
Jeff Escalante
@jescalan
Aug 04 2014 15:01
hmm... have you had a moment to look into the symlink issue?
if you could give me a little more of a head start would be happy to help
Tobias Birmili
@toabi
Aug 04 2014 15:04
Well, not yet looking at the source yet. If I have a symlinkassets -> /Users/toabi/projects/some_assets, then roots creates public/Users/toabi/project/some_assets and puts everything there.
Jeff Escalante
@jescalan
Aug 04 2014 15:05
interesting
it must be part of the way symlinks are read internally
I must admit I did not anticipate the use case of having symlinked identical assets between different projects
and nobody else has run into this yet, so probably it's a bug
Tobias Birmili
@toabi
Aug 04 2014 15:06
yeah the shared assets are not optimal
Jeff Escalante
@jescalan
Aug 04 2014 15:06
perhaps there's another way to structure the project(s) so that's not the case?
or perhaps you can host the assets you need shared and link to that?
Tobias Birmili
@toabi
Aug 04 2014 15:07
Well, it's mainly about sharing CSS between projects
and having two roots instances at the same time serving the one "work-in-progress" version of them
Jeff Escalante
@jescalan
Aug 04 2014 15:08
im not sure i totally understand, tell me more?
Tobias Birmili
@toabi
Aug 04 2014 15:09
I could create a static server on localhost:1234 and put the css files there and <link> to there. But then for production one would have to change that again and it's not "one-click" to set up.
Well, two different roots pages which share so global css framework
but that framework is under construction so it needs to be tested simultaneously on both sites
Jeff Escalante
@jescalan
Aug 04 2014 15:10
ah ok right
i see what you mean
thats tough
yeah i think really the best way is to dig in and fix the symlink issue
it should be a simple pathing fix based on what you have described, just not entirely sure where it would be and don't have time at the moment to run a full reproduction and debug, which is why I was seeing if you'd be able to get the process started at least
Tobias Birmili
@toabi
Aug 04 2014 15:13
I'll look into that. And why does the assets_folder in app.coffee do nothing? Or is it the wrong key?
Jeff Escalante
@jescalan
Aug 04 2014 15:15
wrong key
it's dirs: { assets: 'key' }
@project is the config root
you can see in the code you linked above its nested under dirs
Tobias Birmili
@toabi
Aug 04 2014 15:16
eh, but it is read by the config parser as @config.assets_folderand as I understood @config is the app.coffee
well I'm looking at the symlink thingy now
Jeff Escalante
@jescalan
Aug 04 2014 15:22
1sec in a meeting
Tobias Birmili
@toabi
Aug 04 2014 15:22
jo no problem :)
but maybe the issue lies even in the code passing things into this
toabi @toabi is away for a while
Jeff Escalante
@jescalan
Aug 04 2014 21:07
Hey sorry back
had something of a important thing to deal with