These are chat archives for jescalan/roots

21st
Apr 2016
Daniel Box
@dbox
Apr 21 2016 03:41
:point_up: April 14, 2016 1:06 PM Huge +1 from me if someone could do it
Daniel Box
@dbox
Apr 21 2016 03:51
stylus can't reference app.coffee locals can it?
Jeff Escalante
@jescalan
Apr 21 2016 13:35
you can pass locals to stylus through accord, which takes options from stylus in app.coffee
should be easy to make an extension for "critical css"
at the same time i question the utility of this tool
if your page is loading slow, it's probably the images and/or js, not the css
also after initial load all the css gets cached anyway
idn seems like the type of optimization that should be way down at the bottom of the value ladder, after everything else on your site is ultra optimized
and if it's still loading slow
which seems doubtful
Daniel Box
@dbox
Apr 21 2016 14:13

idn seems like the type of optimization that should be way down at the bottom of the value ladder, after everything else on your site is ultra optimized

yeah, definitely. i just want to get a 100 on google page insights :)

re: stylus, basically I just want stylus to have access to an array that I have in app.coffee
looking into accord docs
Jeff Escalante
@jescalan
Apr 21 2016 14:13
hahah
fair enough
yeah you can pass that through stylus: { define: { x: 'y' } }
not sure how stylus handles arrays but give it a try
one thing it doesnt handle normally is colors
you have to do some weird stylus node transform, cant just pass a hex
Daniel Box
@dbox
Apr 21 2016 14:16
its just a list of project names
which i have the same array repeated in stylus currently
so stylus has this:
$sites = moovit harrison etc etc etc
app.coffee has:
sites: ['moovit', 'harrison', 'harrison', 'etc', 'etc', 'etc']
would just be nice not to have to update both places
would the stylus part of app.coffee need to be after locals
Jeff Escalante
@jescalan
Apr 21 2016 14:20
doesnt matter its an object
any order
Daniel Box
@dbox
Apr 21 2016 14:21
  stylus:
    import: ['jeet', 'rupture']
    use: [jeet(), axis(), rupture(), autoprefixer()]
    sourcemap: true
    define: [$sites: 'sites']
?
something like that?
Jeff Escalante
@jescalan
Apr 21 2016 14:22
define: { sites: ['foo', 'bar'] }
define takes an object
Daniel Box
@dbox
Apr 21 2016 14:22
but that would still be listing it twice, no?
i need it in locals too
for js and jade
Jeff Escalante
@jescalan
Apr 21 2016 14:22
yeah sites: sites is fine too
just demonstrating the types accepted
Daniel Box
@dbox
Apr 21 2016 14:23
do i do brackets like that?
define: { sites: sites }
i'll mess with it
thnx
Jeff Escalante
@jescalan
Apr 21 2016 14:24
yeah, or you can return and indent
Daniel Box
@dbox
Apr 21 2016 14:25
and if i used $ for stylus?
Jeff Escalante
@jescalan
Apr 21 2016 14:27
i'd string quote the key then
'$sites': sites
when you have any type of special char in an object key, safe to string quote it
Daniel Box
@dbox
Apr 21 2016 14:28
[ReferenceError: sites is not defined]
Jeff Escalante
@jescalan
Apr 21 2016 14:29
in stylus or in your js
Daniel Box
@dbox
Apr 21 2016 14:30
not sure. just happened when i did that
i switched them and got a little further
i'll keep working on it. thanks for help
Jeff Escalante
@jescalan
Apr 21 2016 14:33
:+1:
Daniel Box
@dbox
Apr 21 2016 14:53
define: { '$sites': ['juicero', 'lyve', 'dreamstudio'] ..}
that works!
so minor progress
just doesnt work when i try to replace the array with the array name in locals
Jeff Escalante
@jescalan
Apr 21 2016 15:28
nice!
huh thats weird
doesnt entirely make sense
in javascript a var pointing to an array is the exact same thing as an array
ah did you guys make the juicero site?
Daniel Box
@dbox
Apr 21 2016 15:39
yeah
ROOTS
sadly juicero is not roots
Jeff Escalante
@jescalan
Apr 21 2016 15:50
aw
we're talking with a guy who was a CXO there
good dude
Daniel Box
@dbox
Apr 21 2016 18:20
nice. we had a great experience with their whole team