These are chat archives for jescalan/roots

20th
Jul 2015
Henry Snopek
@hhsnopek
Jul 20 2015 00:32
@jenius something else is up with roots
unsure what it is, but roots-browserify (v0.3.2) doesn't work with roots (v3.2.1)
using roots (v3.1.0) everything becomes normal again
John Peele
@johnpeele
Jul 20 2015 13:29
can someone please remind me how to begin a new project with .ejs instead of .jade templates?
Henry Snopek
@hhsnopek
Jul 20 2015 14:52
change all extensions from .jade files to .ejs
run npm i ejs -S to get enable ejs support for accord
remove jade from your package.json
then make some money :moneybag:! (roots watch)
Daniel Box
@dbox
Jul 20 2015 14:54
:clap:
John Peele
@johnpeele
Jul 20 2015 14:54
@hhsnopek that's what i did. but i thought i remember there being an override option for creating a new project with ejs from the start
Henry Snopek
@hhsnopek
Jul 20 2015 14:54
hmm there might be a roots template
here it is!
all you gotta do is add the template
This message was deleted
This message was deleted
This message was deleted
roots tpl add ejs git@github.com:roots-dev/roots-template-ejs.git
then roots new projectName --template ejs
John Peele
@johnpeele
Jul 20 2015 15:15
cool. that template is throwing an error [Error: neither init.coffee nor init.js exist in this template]
Henry Snopek
@hhsnopek
Jul 20 2015 15:16
hmm it's quite possible that the template is outdated to the most recent version of sprout
what version of roots are you running?
John Peele
@johnpeele
Jul 20 2015 15:16
@hhsnopek 3.2.1
Henry Snopek
@hhsnopek
Jul 20 2015 15:17
try using the template with 3.1.0
John Peele
@johnpeele
Jul 20 2015 15:17
i'll just fork and add an init.coffee
Henry Snopek
@hhsnopek
Jul 20 2015 15:17
that works too :thumbsup: - if you need a reference checkout: https://github.com/carrot/sprout-roots-marionette
Brian Zerangue
@bzerangue
Jul 20 2015 15:31
Is there any plans for roots-template-swig branch?
Henry Snopek
@hhsnopek
Jul 20 2015 18:47
@bzerangue you could easily make one yourself :grinning: - roots uses https://github.com/carrot/sprout to create all of it's templates
basically all you'd need to do is exactly what I explained for the ejs template, but use swig instead
John Peele
@johnpeele
Jul 20 2015 18:54
@jenius is anyone having issues with 3.2.1 not resolving image paths? either inline images or images in CSS?
Henry Snopek
@hhsnopek
Jul 20 2015 18:55
@johnpeele there's an issue open for it atm: jenius/roots#655
Daniel Box
@dbox
Jul 20 2015 19:52
for some reason whenever i add an out to css-pipeline it breaks my sourcemaps. Is that supposed to behave like that?
Henry Snopek
@hhsnopek
Jul 20 2015 19:52
what version of roots?
Daniel Box
@dbox
Jul 20 2015 19:52
the only way i can keep souce maps is if both assets/foldername and public/foldername match. Ideally i want to have assets/stylus compiling into public/css
3.1.1 currently i think
3.1.0
actually
Henry Snopek
@hhsnopek
Jul 20 2015 19:53
hmm okay
why do you want to change the foldername? the normal layout is assets/css --> public/css
Daniel Box
@dbox
Jul 20 2015 19:54
i just like it to say assets/stylus --> public/css
just personal pref thing
but i can live with assets/css if i have to
dont you think assets/stylus is better too? :D
Henry Snopek
@hhsnopek
Jul 20 2015 21:26
haha tbh it becomes css
and when I think about it as I'm modifying my project I always think of css, as stylus is the preprocessor and not the end point
Daniel Box
@dbox
Jul 20 2015 21:59
but at THAT point it's stylus. i think most scss projects have the folder called scss
minor issue i realize
so it that a roots thing or an accord thing?
Henry Snopek
@hhsnopek
Jul 20 2015 22:21
roots thing
personally when I'm looking through the source of a project, I don't know what the preprocessor is or if there is one for the project
so if I just look in assets and see css, I know I found the right folder
that's my personal preference
also helps other that don't know what the preprocessors are
plus it's one thing less to document if it's just in css
Daniel Box
@dbox
Jul 20 2015 22:26
Ok. I do whatever you say.
Nishant Menon
@nishtacular
Jul 20 2015 22:38
hey guys hoping to get some help with routing again. I'm using page.js for routing and if you consider normal scenarios all is working well.
However, I now have an issue with error handlers. If i were to route to an invalid page for example /foo I get the "Uh Oh Something went wrong page" from roots since there is no foo.jade
The issue basically is that the page.js routing is not fired since no js is loaded and roots errors out. I'm stumped on this so any pointers will be much appreciated. @jenius @hhsnopek
Skeleton code here: https://gist.github.com/nishtacular/d3667de3a45aaaf1746e
Nishant Menon
@nishtacular
Jul 20 2015 22:44
Further on the point above, I'm basically trying to navigate to pages like /user/homer however, roots seems to be looking homer.jade which doesn't really exist.
Nishant Menon
@nishtacular
Jul 20 2015 23:27
Also, I should point out that everything works well if don't navigate directly to these pages. For example if i were to load /about and then navigate to /user/homer all's sweet. Only run into issues if I navigate directly to /user/homer