These are chat archives for jescalan/roots

26th
Oct 2015
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 16:49
is there support for multiple layout files anymore?
Declan de Wet
@declandewet
Oct 26 2015 16:51
@sethkrasnianski yes, jade supports multiple layouts - not too familiar with the other templating engines as jade is my weapon of choice
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 16:52
oh… that’s right. I can just set it up under jade: with jade options
:thumbsup:
Declan de Wet
@declandewet
Oct 26 2015 16:57
no need to pass options to jade for this, you can use jade's built-in extends directive
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 16:59
it’s a legacy build that was using roots 2.0 with multiple layouts. I was trying to mimic the multi layouts config from 2 with the new v3 app.coffee
I don’t think I need that config anymore though
Declan de Wet
@declandewet
Oct 26 2015 17:02
ah, yeah you're gonna need to refactor quite a bit - the transition from 2.0 to 3.0 saw a lot of removing unneeded functionality out of roots and separating out the logic into more loosely coupled atomic units each with their own concerns - the multiple layouts being one of the features that were removed, since you can just use the templating engine for this usually
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 17:02
:thumbsup: it’s quite the improvement
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 19:00
during the 2 > 3 upgrade I’m getting stylus variable scoping issues. Has anyone seen this?
we have a master file with the variables imported at the top
but none of the subsequent files have access to the variables
Declan de Wet
@declandewet
Oct 26 2015 19:02
doesn't sound right - could you share a gist with one or two files that best indicate your CSS import pipeline?
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 19:10
Sure
that’s pretty much what’s going on
still hunting down whether it’s my own issue or not
since a lot has changed in every lib out there since roots 2
Declan de Wet
@declandewet
Oct 26 2015 19:14
as far as I understand, that should work - the default template for roots uses a similar approach - site-wide style variables are defined in a _settings.styl file (there's nothing special about this file, mind you) which is imported at the very top of master.styl and I've never encountered issues with missing variables
have you tried updating to the latest stylus version?
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 19:15
I am on the latest :/
I’ll keep digging
Declan de Wet
@declandewet
Oct 26 2015 19:16
otherwise, for now I'd just @import your variables file in every file you need it in - know it's a pain but it'll at least get you to a point where you can compile your site
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 19:16
yeah
thanks for the help
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 19:59
if I create a manifest like so
- vendor/jquery/*
- vendor/jquery.plugin.min.js
- main.coffee

- vendor/nayquery/*
- vendor/nayquery.plugin.min.js
- notmain.coffee
I can expect it to produce two coffee files, correct?
Declan de Wet
@declandewet
Oct 26 2015 20:12
I don't think that will work - it looks like that only supports a single array being compiled out to a single build.js
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 20:13
hmm
no way of achieving two files?
we have one release that requires separate files
we could achieve it with v2
via the main.coffee file that implemented an asset-pipeline-like file
Declan de Wet
@declandewet
Oct 26 2015 20:14
give me a second to investigate (i'm new to the manifest file syntax myself)
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 20:14
sure
thanks
Declan de Wet
@declandewet
Oct 26 2015 20:34
right - it appears that js-pipeline is currently geared for more simple use cases
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 20:35
alright, appreciate you looking into it :)
Declan de Wet
@declandewet
Oct 26 2015 20:35
currently, just passing in a manifest file will build the compiled js version for each file in the manifest and inject the relevant script tags into the html
but if you pass in an out option to js-pipeline, those files then get concat'ed in the order they appear in the manifest
for more granular control over your build process, I'd recommend looking at these options:
Seth Krasnianski
@sethkrasnianski
Oct 26 2015 20:37
gracias