These are chat archives for jescalan/roots

5th
Aug 2015
Kassym Dorsel
@kdorsel
Aug 05 2015 01:33
Hey guys checking out this roots thing. I'm curious how you deal with js libraries for both dev and production (using cdn). easiest example would be jquery. Can't seem to find anything except the browserify-cdnjs
Henry Snopek
@hhsnopek
Aug 05 2015 04:53
@argyleink can you make sure you're using roots v3.1.0
also we love questions here! a lot of times we're busy, but I try to get to questions when I can
@kdorsel you'd require jquery like any other project
you can add it as a script tag or use browserify
Jeff Escalante
@jescalan
Aug 05 2015 09:43
Yeah sorry if there's a late response, I'm working part time this year so also have very little time but am consistently checking here
Adam Argyle
@argyleink
Aug 05 2015 15:44
no prob dudes, i didnt wanna sound whiney, and wanted to double check i was connecting with ya the way you want.
i've switched my roots version a few times, but sure, lemme go back to 3.1.0
Kassym Dorsel
@kdorsel
Aug 05 2015 15:45
thanks, I was more wondering about extensions for production build that change the script tag from local path to cdn url
Adam Argyle
@argyleink
Aug 05 2015 15:53
i'm using roots-yaml and dynamic-content for a blog, each contributor's posts are in their respective folders by name. so i'm gathering the post author using the _categories array provided to the _single.jade layout. it says it fails, but it actually succeeds. seems like a wierd build timing thing.
- var author_handle = post._categories[1] 
- var author = data.authors[author_handle]
error: author is undefined
why is roots trying to compile a view where the yaml and/or post json isnt ready?
also, is order respected in the extension array config?
extensions: [
    roots_yaml()
    dynamic(write: 'content.json')
    js_pipeline(files: [
      'bower_components/isotope/dist/isotope.pkgd.min.js'
      'assets/js/*.coffee'
    ])
    css_pipeline(files: [
      'assets/css/*.styl'
      'bower_components/reflex/css/reflex.css'
    ])
  ]
Adam Argyle
@argyleink
Aug 05 2015 16:09
my goals are to be dry, and not rely on an author to put their name in the frontmatter, should be assumed from the folder
Adam Argyle
@argyleink
Aug 05 2015 16:19
as a side note, i really hope to see static sites built against data become more popular, i find it much more valuable and reliable than react/angular thick client alternatives that are currently popular. i've built tons with each, and i think static sites are a more appropriate solution to web apps. so this tool rules, i've built a few things with it, and yeah, just want to make sure you guys get some props for all this bitchen fuckin work!
Henry Snopek
@hhsnopek
Aug 05 2015 16:59
ping @jenius ^
Adam Argyle
@argyleink
Aug 05 2015 18:16
are there any cli api's for extensions, to run them manually? i'm dreaming here, but something like roots compile-extension --roots-yaml
Henry Snopek
@hhsnopek
Aug 05 2015 18:17
there isn't :/
Adam Argyle
@argyleink
Aug 05 2015 18:19
coo np
Adam Argyle
@argyleink
Aug 05 2015 19:07
good news, user error with the author undefined, i had misspelled an authors last name, roots is off the hook, and can point the finger at a silly dev!
Adam Argyle
@argyleink
Aug 05 2015 20:07
and after further testing, that wasnt the resolution, we set a default yaml object to fallback if nothing is found in _categories..
Henry Snopek
@hhsnopek
Aug 05 2015 20:08
hmm unsure :/ I'm unable to debug as I got a bunch of deadlines
Jeff Escalante
@jescalan
Aug 05 2015 20:25
@argyleink sorry, this is a documented bug. it's on my list but i dont have much time
Adam Argyle
@argyleink
Aug 05 2015 20:25
no worries, we found a work around!
Jeff Escalante
@jescalan
Aug 05 2015 20:25
awesome! if you want feel free to jump in and submit a patch
its not a hard fix i just need a solid half hour or so and its not at the top of my priorities list at the moment
Adam Argyle
@argyleink
Aug 05 2015 20:26
our patch is in our jade template =) set a default object in there so the template renders on the first pass, then the 2nd pass has all proper objects and renders fine
Jeff Escalante
@jescalan
Aug 05 2015 20:26
also thanks for the props, and we are hoping the same! I know that @biilmann is on the same page, we really believe in data-driven static sites
Adam Argyle
@argyleink
Aug 05 2015 20:27
cool yup, i agree, and i've dove into a couple of the tools and peaked at how to help. i'll get more serious when there's not a deadline loomin
Jeff Escalante
@jescalan
Aug 05 2015 20:27
absolutely!
on a related note, i just dropped greatly improved version of roots-records today
give it a try if you haven't yet :)
Adam Argyle
@argyleink
Aug 05 2015 20:30
guess what, we are!
we're turning the git commit history into json, passing it as a record, to get dates and changes from the authors posts!
Jeff Escalante
@jescalan
Aug 05 2015 20:31
woah, awesome
Adam Argyle
@argyleink
Aug 05 2015 20:31
data! wooo
Jeff Escalante
@jescalan
Aug 05 2015 20:32
all about dat data
Adam Argyle
@argyleink
Aug 05 2015 22:52
<3