These are chat archives for jescalan/roots

14th
Sep 2015
Michael Kornblum
@michaelkornblum
Sep 14 2015 02:09 UTC
A big thank you towards @jenius and @SevereOverfl0w for your assistance and insight to this speed bump that I'm hitting. I've taken @SevereOverfl0w 's suggestion of adding a write option to the app.coffee file, but now I'm getting a ``[TypeError: Cannot read property 'length' of undefined]``` upon compilation. How do I go about fixing this? Additionally, since I'm pulling data from an external json object, would I also change my jade templates to reflect this? Thanks again.
Michael Kornblum
@michaelkornblum
Sep 14 2015 02:17 UTC
I realize that these questions may seem a little newbish, but I really want to learn the ins and outs of this system, so I can make something really spectacular.
Jeff Escalante
@jescalan
Sep 14 2015 10:08 UTC
@SevereOverfl0w nope, just jade if you just have the .jade extension
multipass dictates the the number of extensions you add equals the number of passes you need
@michaelkornblum im not sure i have enough context to answer this
John Peele
@johnpeele
Sep 14 2015 15:01 UTC
morning all! anyone integrated Rucksack yet? http://simplaio.github.io/rucksack/
I searched the archives and couldn't find any references to it.
it is built on PostCSS and can be integrated directly with Stylus, so i figured it would be a great addition to the Roots ecosystem.
John Peele
@johnpeele
Sep 14 2015 15:46 UTC
@dbox @hhsnopek did either of you nail down how to use PostCSS??
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 15:47 UTC
@johnpeele https://github.com/jenius/accord/blob/master/lib/adapters/postcss/4.x%20-%205.x.coffee tl;dr install postcss via npm, and it'll process your .css files as css.
John Peele
@johnpeele
Sep 14 2015 15:56 UTC
@SevereOverfl0w what does app.coffee look like?
@SevereOverfl0w do i need to rename stylus files as filename.css.styl to account for multipass?
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 16:05 UTC
@johnpeele Only if you want stylus -> postcss
@johnpeele err... app.coffee would.. good question.
Lemme find out
John Peele
@johnpeele
Sep 14 2015 16:06 UTC
@SevereOverfl0w i do want stylus first, then postcss
if i rename my stylus file to main.css.styl then it gets rewritten to main.css.css
which the css_pipeline writes main.css into my index.html, so the rendered css file isn't found
yay
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 16:08 UTC
@johnpeele That should be the process for doing both. Lemme spin up a test project & find out
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 16:16 UTC
Okay, so just doing postcss here:
And that enables a random plugin I chose (and have confirmed is working)
John Peele
@johnpeele
Sep 14 2015 16:19 UTC
@SevereOverfl0w sweet. just need to figure out stylus + postcss
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 16:22 UTC
@johnpeele so it is working, just multi-pass is getting a little bit confused.
OR it might be the injector function
Yes, that's where I'll look first for the culprit.
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 16:27 UTC
I'm gonna have to step into it I think, I wish node had a good debugger, so I wasn't just println'ing stuff
John Peele
@johnpeele
Sep 14 2015 16:28 UTC
@SevereOverfl0w thanks for the help tracking that down
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 16:28 UTC
@johnpeele My pleasure.
John Peele
@johnpeele
Sep 14 2015 16:29 UTC
@SevereOverfl0w i am ultimately wanting to use this - http://simplaio.github.io/rucksack
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 16:30 UTC
Basically, you just have to replace css-variables with rucksack.
You can stick as many plugins into use: [] as you like
Looks like the function is trying to replace the file extension with ".css" but is essentially having trouble locating it.
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 16:40 UTC
I may have a fix, just testing it in my test environ
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 16:51 UTC
@johnpeele carrot/roots-css-pipeline#14 ta-da
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:19 UTC
@biilmann completely OT, but does your $9/mo tier have automatic rebuilding?
Jeff Escalante
@jescalan
Sep 14 2015 17:27 UTC
@johnpeele stylus/axis has all of these features and a lot more
;)
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:28 UTC
@jenius I think that postcss may be more future-friendly.
SevereOverfl0w @SevereOverfl0w runs & hides
Jeff Escalante
@jescalan
Sep 14 2015 17:29 UTC
haha it is only if you intend to drop stylus
they both compile to css
and neither one will ever work without being compiled to css
just happen in a different order
postcss might be faster though, im not sure
if i could get all the features I use from stylus in postcss, and it was faster, I'd probably run a port of axis to postcss for fun
Mathias Biilmann
@biilmann
Sep 14 2015 17:31 UTC
@SevereOverfl0w yes, it does :)
Jeff Escalante
@jescalan
Sep 14 2015 17:32 UTC
netlify :+1:
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:39 UTC
@biilmann Your pricing table is confusing. What's the $29/mo for then? :p
@jenius I kinda like the idea of using stylus purely for syntax improvements.
And then postcss for vars & whatnot.
Jeff Escalante
@jescalan
Sep 14 2015 17:41 UTC
whatever floats ya boat! :)
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:41 UTC
then when css4 arrives (tm), it's an easy swap. But I do agree. It's only a real consideration for swapping.
Jeff Escalante
@jescalan
Sep 14 2015 17:42 UTC
im not sure it is, all the libraries will need to be rewritten for changes either way
both are preprocessors in that they compile X to css
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:42 UTC
I was going to make a case for hiring too, but I'd say that css4 variables are more confusing than stylus.
Jeff Escalante
@jescalan
Sep 14 2015 17:43 UTC
haha that too. one of the reasons im not super looking forward to going to es6
because coffeescript has all the same features, has for a long time, and is smoother
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:43 UTC
ES6 is actually quite nice. I've made the switch back, and I'll admit, I prefer having my delimiters back.
Jeff Escalante
@jescalan
Sep 14 2015 17:43 UTC
but i do see the value in the global standards for working together and speed and such. my reaction is just -_-
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:44 UTC
Tell you what excites me (that nobody is talking about) are proxies. Mostly because they can't be polyfilled.
Jeff Escalante
@jescalan
Sep 14 2015 17:45 UTC
dont know much about these i must admit!
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:45 UTC
They'd allow you to do test(x).is.a.number as opposed to test(x).is.a('number')
Essentially they allow for a catch all on object access.
Jeff Escalante
@jescalan
Sep 14 2015 17:46 UTC
ah nice
dangerous, but nice
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:46 UTC
So that whenever I lookup a property on an object, it goes through my function instead, which decides what to give you.
Jeff Escalante
@jescalan
Sep 14 2015 17:46 UTC
i feel like i found a super hacky way to do this a while ago
let me look this up
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:46 UTC
Yeah, definitely dangerous. Python has this feature though, and it's resulted in some rather nice solutions there for things.
Jeff Escalante
@jescalan
Sep 14 2015 17:47 UTC
ya ya, @__defineGetter__
maybe this is node only, but you can use this to do that kind of shit
its the core of this library which never picked up or got anywhere haha
Jeff Escalante
@jescalan
Sep 14 2015 17:52 UTC
haha
really dug that one out though
when i found it i was shocked
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:52 UTC
Now it's standardized though, and will exist for real. I didn't know that node.js had implemented it tbh.
Jeff Escalante
@jescalan
Sep 14 2015 17:52 UTC
yeah i didnt either, never used it since. good that we have an official way though
:)
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:52 UTC
It's a silly assumption I made. Test frameworks aren't using it => Probably not implemented in node.js
Jeff Escalante
@jescalan
Sep 14 2015 17:53 UTC
hah yeah it does seem like it would be useful for test frameworks
chai might be using it, they have some very smooth syntax
Dominic Monroe
@SevereOverfl0w
Sep 14 2015 17:56 UTC
@jenius iirc, they're not. I checked it out a while back. And they've (fairly monotonously), done it manually.
Jeff Escalante
@jescalan
Sep 14 2015 18:03 UTC
crazy