These are chat archives for jescalan/roots

21st
Aug 2015
Dominic Monroe
@SevereOverfl0w
Aug 21 2015 02:17

@jenius I made a pull request regarding [object Object], it's all fixed.

roots-css-pipeline was using the cleancss api improperly.

Nick Splendorr
@Splendorr
Aug 21 2015 04:01
Hey everybody! I dropped the minified snap.svg JS file into a new Roots project, linked to it, and my page is giving me an "Uncaught SyntaxError: Illegal return statement" on line 1. Looking at the code, it seems like Roots is adding a long line at the top of the file that's causing the error? Weirdly, if I just load the built index.html file directly in the browser (without depending on Roots' localhost server), the code runs perfectly! No error, behaves as expected. What the heck is happening? (I just double-checked my Node and Roots installs, they're up to date. The Snap.svg-min.js file is here: http://snapsvg.io, the minified file.)
Here's my code on GitHub, without the Roots-generated public folder. If you do "roots watch" on this repo, it will give you the error. But if you load the generated index.html file, it will produce no error, and should show a blue background with the word "SQUIRE" and an SVG circle on it. This is weirding me out.
Nick Splendorr
@Splendorr
Aug 21 2015 04:06
Thanks to anyone who can take a look at this and tell me if I've just done something goofy, or if you aren't seeing this error.
Kristoffer Ahl
@kristofferahl
Aug 21 2015 06:44
@jenius That's great! Could you show me an example of using sass with roots. Can't find any info in the docs.
Dominic Monroe
@SevereOverfl0w
Aug 21 2015 10:31
@kristofferahl I believe you just create files name .scss
Pranz
@Pranz
Aug 21 2015 11:22
@jenius: yeah I read that through, and I managed to create a working plugin now, but it doesn't work with dynamic content
@jenius: whenever I include my plugin my dynamic content is undefined
Pranz
@Pranz
Aug 21 2015 11:28
@jenius: here is my code http://lpaste.net/139352
Pranz
@Pranz
Aug 21 2015 11:33
@trodrigu you might want to change the title of the homepage from "/index.html"
John Peele
@johnpeele
Aug 21 2015 13:21
good morning crew! i was wondering what is the best practice for javascript pipeline now? the default js_pipeline or roots-browserify or ???
i simple want to be able to concat my main.coffee file with my other vendor scripts - jquery, parsley, etc.
*simply
Phil Hawksworth
@philhawksworth
Aug 21 2015 14:57
Another spin on a common question I think... I'm wanting to use jinja2 for my templates. I added this via https://www.npmjs.com/package/jinja-js but I'm not sure how to ensure roots attempts to use jinja to render the views
can anyone point me in the right direction?
Phil Hawksworth
@philhawksworth
Aug 21 2015 15:05
perhaps nunjucks would be better... same question though. How best to associate .html views with this template engine?
Dominic Monroe
@SevereOverfl0w
Aug 21 2015 15:06
@philhawksworth Out of the box, roots uses a library to process views.
@philhawksworth https://github.com/jenius/accord accord
https://github.com/jenius/accord#html these are what work with it by default
https://github.com/jenius/accord#accord-adapter-methods there is a way to create a new adapter, (e.g. with nunjucks or jinja-js)
Dominic Monroe
@SevereOverfl0w
Aug 21 2015 15:14
No idea if you can add an adapter from roots though
Phil Hawksworth
@philhawksworth
Aug 21 2015 15:23
Thanks @SevereOverfl0w - Swig is pretty close to what I need and accord already supports that. This might get me what I need.
Dominic Monroe
@SevereOverfl0w
Aug 21 2015 15:37
No problem @philhawksworth
Thomas Rodriguez
@trodrigu
Aug 21 2015 22:48
@Pranz I agree 100%