These are chat archives for jescalan/roots

10th
May 2016
Tom Kraak
@tkraak
May 10 2016 01:30
what’s the difference between locals and roots-config?
roots-config is more powerful since it makes config values available to js too?
Tom Kraak
@tkraak
May 10 2016 02:00
could get neither one of them to work :(
Tom Kraak
@tkraak
May 10 2016 03:04
neverming, things are looking better now :)

is this the package to use if I want to switch fron stylus to sass?

https://www.npmjs.com/package/roots-sass

Ben Styles
@benadamstyles
May 10 2016 07:55
I don't think you need it, I think roots supports sass by default. I am not using roots-sass and Sass is working fine. I have the following in my app.coffee:
scss:
    includePaths: [
      './bower_components/'
      './node_modules/'
    ]
    outFile: './public/css/app.css'
    outputStyle: 'compressed'
    sourceMap: true
    sourceMapEmbed: true
    indentedSyntax: true
Tom Kraak
@tkraak
May 10 2016 12:00
oh really? is that documented somewhere?
Tom Kraak
@tkraak
May 10 2016 12:12
oh, css_pipeline does that?
Tom Kraak
@tkraak
May 10 2016 12:53
no :)
Ben Styles
@benadamstyles
May 10 2016 13:20
no, not using css_pipeline. I think accord does it, as long as you have node-sass installed and you use the multipass compilation extension (i.e. app.css.scss)
Tom Kraak
@tkraak
May 10 2016 13:21
I see, I have to look into that
node-sass is not installed by default
looks like roots-sass is “just a wrapper” for node-sass anyway
Ben Styles
@benadamstyles
May 10 2016 13:23
right, no it isn't. Sorry, it's been ages since I've started a new roots project!
Tom Kraak
@tkraak
May 10 2016 13:23
how come?
Ben Styles
@benadamstyles
May 10 2016 13:23
Just because I am in the middle of working with existing roots projects!
Tom Kraak
@tkraak
May 10 2016 13:24
best answer ever :)
there is definitely a lot going on coming from Jekyll
Ben Styles
@benadamstyles
May 10 2016 13:24
😛
what do you mean?
Tom Kraak
@tkraak
May 10 2016 13:25
but I’m committed
Ben Styles
@benadamstyles
May 10 2016 13:25
Oh I see
like, a lot to think about
?
Tom Kraak
@tkraak
May 10 2016 13:25
correct
Ben Styles
@benadamstyles
May 10 2016 13:25
Yeah it's way more open, less opinionated
Tom Kraak
@tkraak
May 10 2016 13:25
roots seems way more flexible
Ben Styles
@benadamstyles
May 10 2016 13:25
yeah
Tom Kraak
@tkraak
May 10 2016 13:25
exactly
but with that flexibility comes responsiblity
This message was deleted
how do you handle includes?
looks like jade does it
Tom Kraak
@tkraak
May 10 2016 13:27
in jekyll, I frequently pass stuff into includes … does not look like jade supports that though
Ben Styles
@benadamstyles
May 10 2016 13:28
mixins!
Tom Kraak
@tkraak
May 10 2016 13:28
oh!
Jade is just javascript, so it's way more powerful thank Jekyll's liquid syntax, which is just awful to be honest
Tom Kraak
@tkraak
May 10 2016 13:28
They are compiled to functions and can take arguments.
Ben Styles
@benadamstyles
May 10 2016 13:29
try pushing to an array in liquid :cry:
Tom Kraak
@tkraak
May 10 2016 13:29
wow!
man, this is going to be fun
thx!
Ben Styles
@benadamstyles
May 10 2016 13:30
:thumbsup:
Tom Kraak
@tkraak
May 10 2016 13:30
you are not a fan of liquid?
good to get into templating languages I think
Ben Styles
@benadamstyles
May 10 2016 13:34
liquid was designed for a very specific purpose (shopify customers, most of whom are not natural devs) and I never really understood why jekyll chose it.
Tom Kraak
@tkraak
May 10 2016 13:35
yeah, that’s how I first used it, on a shopify project
which made the transition to jekyll easy, but I totally see your point
Jeff Escalante
@jescalan
May 10 2016 13:51
hey @tkraak sorry i missed a lot here. with roots, you can just install a compiler with npm and use the extension and it will work
so you can npm i node-sass then use .sass as a file extension and it will compile
docs for each language's options are here: https://github.com/jenius/accord/tree/master/docs
sorry this isn't more well-documented on roots' site
roots-config is really for convenience. it gives you a helper that you can use in your layout that will expose all the locals from app.coffee to your javascript
Tom Kraak
@tkraak
May 10 2016 13:53
thanks much! I’ll contribute to the docs once I wrap my head around this :)
Jeff Escalante
@jescalan
May 10 2016 13:53
:+1: :tada:
we are also working on a second experimental version of roots right now. it's in early stages, but is in use in production at my company
feel free to test and/or keep an eye on this if you want
Tom Kraak
@tkraak
May 10 2016 13:54
sure will!
how do I roots new into the current directory?
Jeff Escalante
@jescalan
May 10 2016 13:56
roots-mini is even more opinionated, faster, and uses webpack as the core compiler, so any webpack plugins will work with it
roots new creates the directory for you
so you don't need to mkdir for the project
just cd into your projects folder and roots new project-name
it will create the folder and the file structure
Tom Kraak
@tkraak
May 10 2016 13:56
right, but I already created it by hand, I’ll just delete it then and let roots do it
Jeff Escalante
@jescalan
May 10 2016 13:56
yup
presumably it's empty so should be simple
Tom Kraak
@tkraak
May 10 2016 13:57
corret :)
thanks for such a warm welome here, I’m blown away
Jeff Escalante
@jescalan
May 10 2016 14:04
of course! thanks for checking out roots :sparkles:
Tom Kraak
@tkraak
May 10 2016 14:07
is there specifc reason that name: in package.json always starts with a -?
Jeff Escalante
@jescalan
May 10 2016 14:21
haven't seen this. it take spaces in name passed into the cli and converts them to dashes. it's possible you had a space before the name
i should probably patch that and have it trim the string before converting to dashes, can run that today
just haven't seen that issue yet haha
Tom Kraak
@tkraak
May 10 2016 14:22
{
  "name": "-learn-roots",
  "description": "A first look at Roots.",
  "dependencies": {
    "autoprefixer-stylus": "0.8.x",
    "axis": "0.5.x",
    "coffee-script": "^1.0.0",
    "css-pipeline": "0.3.x",
    "jade": "^1.0.0",
    "js-pipeline": "0.2.x",
    "jstransformer-marked": "^1.0.0",
    "marked": "0.3.x",
    "rupture": "0.6.x",
    "stylus": "0.52.x"
  }
}
yeah, it did that on both of my installs, the leading - I mean
Jeff Escalante
@jescalan
May 10 2016 14:23
are you on windows?
Tom Kraak
@tkraak
May 10 2016 14:23
hell no :)
Jeff Escalante
@jescalan
May 10 2016 14:23
did you potentially hit space before entering the name?
Tom Kraak
@tkraak
May 10 2016 14:23
no big deal of course, just wonering if that was a js / package.json thing
Jeff Escalante
@jescalan
May 10 2016 14:24
nope, it's our template parser
which by the way is quite useful for other purposes as well, if you are looking for a simpler alternative to yeoman
this is the template we use for new node projects, for example: https://github.com/carrot/sprout-node6
Tom Kraak
@tkraak
May 10 2016 14:24
very much looking forward to getting into templates, so cool!
Jeff Escalante
@jescalan
May 10 2016 14:25
templates are incredibly useful for agencies or freelancers who spin up lots of projects frequently
Tom Kraak
@tkraak
May 10 2016 14:31
like me, for now
Tom Kraak
@tkraak
May 10 2016 15:02
is it Roots or roots?
Jeff Escalante
@jescalan
May 10 2016 15:09
?
Tom Kraak
@tkraak
May 10 2016 15:10
the project name … should it mostly be lowercase?
Jeff Escalante
@jescalan
May 10 2016 15:23
it can be whatever you want!
i always do lowercase personally
because command line
Tom Kraak
@tkraak
May 10 2016 15:41
of course you do :)
Jeff Escalante
@jescalan
May 10 2016 19:52
removing the sourcemaps option from app.coffee should fix the roots issue in 4.1.0
and node 6
for the record
i'll have a patch for this out today as well so that this is not necessary
also a roots major version bump
Tom Kraak
@tkraak
May 10 2016 20:11
:clap:
Jeff Escalante
@jescalan
May 10 2016 21:12
patch released, should take care of all issues from the last release
npm i roots -g will upgrade
roots@4.1.1
Also there is an issue with sourcemaps in older versions of stylus. If you see a stylus issue, upgrade to 0.54.x in your package.json file and it will go away
:tada:
The roots default template was updated to all most recent versions of dependencies today
major version release coming soon, it will remove roots deploy, which is breaking
Tom Kraak
@tkraak
May 10 2016 23:52
woot! :sparkles: