These are chat archives for jescalan/roots

20th
Aug 2015
Pranz
@Pranz
Aug 20 2015 10:26
I'm trying to write a very simple extension which should run all compiled html through a function before it is written to file
but I'm not sure how the file detection should work
I use jade, so should I detect all jade files and then have a complie_hook?
James Brooks
@brks
Aug 20 2015 13:22
Hi, I discovered Roots this morning and I'm trying to get an understanding of how it works. What's the correct way to access images in Roots?
Kristoffer Ahl
@kristofferahl
Aug 20 2015 13:40
Btw. Here's the link to the roots-sass extension if anyone is interested. https://github.com/kristofferahl/roots-sass
Jeff Escalante
@jescalan
Aug 20 2015 16:23
@Pranz detailed guide and docs here: http://roots.cx/docs/extensions
@brks not sure what youre asking. access images?
@kristofferahl very nice! is there any reason you don't just use sass with the extension?
its supported natively
you can just name the file .scss and use the compiler options in app.coffee
@michaelkornblum this would be amazing. repo is open, can be found here: https://github.com/carrot/roots-www
James Brooks
@brks
Aug 20 2015 16:31
@jenius It's a really newbie question, sorry. :stuck_out_tongue: I just want to access images in the assets/img directory from my index Jade file, but I don't know if there is a specific-Roots way of doing it or if I just link to it directly.
Jeff Escalante
@jescalan
Aug 20 2015 17:39
@brks nope, just as usual. link it up. no magic happening really, check the public folder if you're curious what roots is spitting out
not a bad question at all though! totally reasonable. there are roots-y ways of doing certain things, and its hard to know which ones :)
James Brooks
@brks
Aug 20 2015 18:18
Thanks! I have another question, if you don't mind @jenius. I'm using roots-dynamic-content, but do I have to have some kind of markup? Can I just have a folder of YAML files and use the front matter, or do I have to create some kind of page as well?
and regarding the images thing, DevTools isn't saying that it can't find the images now, it has the right path, but the images still aren't loading if they're a PNG/JPG. It's loading SVGs, but not the others.
James Brooks
@brks
Aug 20 2015 19:53
sorry, DevTools *can find the images now.
James Brooks
@brks
Aug 20 2015 20:23
@jenius Any chance my lack of images would be the result of this? jenius/roots#655
Jeff Escalante
@jescalan
Aug 20 2015 21:11
yeah npm i roots@3.1.0 -g will fix this issue
James Brooks
@brks
Aug 20 2015 21:12
Ok, and any chance you could take a look at my other question? :)
Jeff Escalante
@jescalan
Aug 20 2015 21:13
im not sure what the confusion is with dynamic content
did you read the docs?
James Brooks
@brks
Aug 20 2015 21:13
Mhmm, but it uses a Jade file as an example. I don't want to create a seperate page for each of the items I'm using, I just want to have a directory of files that I can iterate through and fill a list with.
Can I just use a YAML file for each with the necessary front matter inside of it.
this extension will let you do it
James Brooks
@brks
Aug 20 2015 21:15
Oh, awesome. Thank you! Would that mean I still need dynamic-content, or can I replace it with this?
Jeff Escalante
@jescalan
Aug 20 2015 21:16
if you just want a yaml file with front matter you dont need dynamic content
dynamic content is good for pieces of content that also hold on to a chunk of markup
James Brooks
@brks
Aug 20 2015 21:16
Ok, thanks for your patience with me. :joy: I'm very much a styles-person normally, I'm not very good with templating etc. Thank you!
Jeff Escalante
@jescalan
Aug 20 2015 21:16
like blog posts, they have metadata but also a "body"
no worries! gotta start somewhere
let me know if theres anything else i can help with of course
James Brooks
@brks
Aug 20 2015 21:18
Also, can you explain what the difference is between app.coffee and app.production.coffee. I presume it's to do with staging, but do I need to keep them both uptodate or not? I'm not really sure of how to use them.
Last question this time, I promise :stuck_out_tongue: @jenius
Thomas Rodriguez
@trodrigu
Aug 20 2015 21:21
i just wanted to say roots is the shiznit and i built my blog on it!
and netlify
Ryan Matsikas
@rmatsikas
Aug 20 2015 21:28
Having a weird issue with compiling css to production and getting [object Object] when minify is true, anyone have any ideas?
also the compile says done! but the task doesnt end...
Mathias Biilmann
@biilmann
Aug 20 2015 21:30
@rmatsikas the hanging compiles are normally due to roots-browserify 0.3.0 - we’ve seen that bug a lot at netlify
just make sure to upgrade to roots-browserify 0.4.0
Ryan Matsikas
@rmatsikas
Aug 20 2015 21:30
k, I am using browserify.. thanks
one down, now the big issue
Jeff Escalante
@jescalan
Aug 20 2015 22:47
@trodrigu you are the man. lets see that blog!
@rmatsikas sorry about the object object issue, it usually has to do with minification. i think it's a bug with a dependency. i'm going to take a look at this as soon as i have a solid block of time to sit down and code, promise
Ryan Matsikas
@rmatsikas
Aug 20 2015 22:49
ok, thought it might have been an issue cause im use .css.style and cssnext etc
Adam Argyle
@argyleink
Aug 20 2015 22:52
i experience object Object in my prod run as well, and am not using browserify. i temporarily resolved by setting the minify flag to false.. so it's not minified, but at least staging is getting css
Ryan Matsikas
@rmatsikas
Aug 20 2015 22:55
ya, was just hoping to shrink up the filesize
Thomas Rodriguez
@trodrigu
Aug 20 2015 23:31
@jenius ok it only has one post about my simple Ruby Terminal Game but the link is http://tommyr.me