These are chat archives for jescalan/roots

24th
Feb 2016
Nathan Walker
@NathanWalker
Feb 24 2016 00:40
Ok @jenius got past all the undefined stuff... believe it or not the fix was as simple as placing the js_pipeline and css_pipeline blocks first in the extensions array
so now I'm actually back to the original error:
/usr/local/Cellar/node/5.5.0/lib/node_modules/roots/node_modules/infestor/index.js:86
        opts.injectContent.apply(this, [content, writeEncoding].concat([].slice.call(arguments, 0))),
btw, I assume roots works fine with node 5.5.0 and npm 3.5.3?
benod3107
@benod3107
Feb 24 2016 00:49
Hi, How do i add styles to posts?
benod3107
@benod3107
Feb 24 2016 00:56
Using roots with jeet() & axis() + rupture() etc. I can change and add styles to my index.jade no problem. Im using the blog template, how do i add and change styles to posts colours etc?
Nathan Walker
@NathanWalker
Feb 24 2016 01:10
Ok @jenius further now... found cause.. .it's some incompatibility with 'charge' and setting the 'server' option
Ok yep... our charge_config had this option: "log": "tiny" ... which blew everything up... ergh... ok fixed now by removing that option
Nathan Walker
@NathanWalker
Feb 24 2016 01:20
Thanks again for all your help today... really really appreciate it!!
benod3107
@benod3107
Feb 24 2016 01:51
All good, not sure if i did it the correct way but i can now style my posts with the blog template..
benod3107
@benod3107
Feb 24 2016 01:57
Next question, the blog post default yaml has, title: author: & _content: how do I add a date to this?
benod3107
@benod3107
Feb 24 2016 02:12
Just worked that out also..
Jeff Escalante
@jescalan
Feb 24 2016 03:30
hey @NathanWalker - charge isn't a dependency for roots v4
major version bump ;)
server options will be sent to browsersync
haha good work @benod3107
and yes latest node will work fine with roots
fourcubed
@fourcubed
Feb 24 2016 18:25
Hi all, can someone help me get jQuery working in my project? I'm using coffeescript and jade. I've installed both via npm. My app.coffee file has
jquery = require 'jquery' browserify = require 'roots-browserify'
My main.coffee has
$ = require 'jquery'
Browserify outputs to js/build.js, and this file is included on my page.
Jeff Escalante
@jescalan
Feb 24 2016 18:47
you don't need to require jquery in app.coffee
you can just load it in your main.coffee
it should work perfectly fine from there
console.log out $ and see what shows up
fourcubed
@fourcubed
Feb 24 2016 18:49
console.log($)
function $(selector, [startNode]) { [Command Line API] }

That's what I get from js console in Chrome. If I do the same console log from main.coffee it prints:
function ( selector, context ) {

// The jQuery object is actually just the init constructor enhanced
// Need init if jQuery is called (just allow error to be thrown if not included)
return ne…

fourcubed
@fourcubed
Feb 24 2016 18:55
New to this, thanks for taking a look :smile:
Jeff Escalante
@jescalan
Feb 24 2016 19:00
yeah, thats jquery
you're all set
use it as usual
Wes Vetter
@wesvetter
Feb 24 2016 20:23

Hi all!

Hopefully simple question here. I'm using Sass with roots and would like
to add Autoprefixer (and potentially some other css/post-sass transformations like combining media queries).

Is there any way to add this to the CSS pipeline?

Jeff Escalante
@jescalan
Feb 24 2016 21:26
yup, in app.coffee you can just drop the key sass
under that pass in any and all sass options/plugins you want
Wes Vetter
@wesvetter
Feb 24 2016 21:27
add or drop?
Jeff Escalante
@jescalan
Feb 24 2016 21:27
sorry, i meant add
as in sass: { x: 'y' }
or newline and indent and drop the parens, coffee style
sass options listed here: https://github.com/sass/node-sass#options
you can also use postcss and sass by installing postcss,naming your files .css.sass and adding plugins through a postcss key in app.coffee
or use stylus which comes set up with autoprefixer by default and is a better library than sass for javascript ;)
Wes Vetter
@wesvetter
Feb 24 2016 21:30
haha, that last part is arguable
Bootstrap 4 is Sass-based now, and I'd like to be able to use Sass for everything
I'll try the sass: method and then the postcss one if I can't get that working, many thanks!
Jeff Escalante
@jescalan
Feb 24 2016 21:33
that may be true, but sass is still not written in javascript, which is a problem
it's being replaced by postcss. i wouldn't be surprised if bootstrap converts to postcss next version
this is our less-invasive and messy alternative to bootstrap as well: http://axis.netlify.com
Wes Vetter
@wesvetter
Feb 24 2016 21:34
I've found node-sass sufficient for most purposes (it has some hangups though)
My personal preference is actually not to use Bootstrap and big libraries, but I'm not going to be the primary maintainer for this project so I want something with the full kitchen-sink so that backend team members can modify it without too much effort.
Jeff Escalante
@jescalan
Feb 24 2016 21:38
:+1:
fair enough