These are chat archives for jescalan/roots

2nd
Jun 2015
Jeff Escalante
@jescalan
Jun 02 2015 18:54
Hi guys, I'm here, checking in. Sorry, have been off the grid for 2 weeks -- are there any outstanding issues I can help with still?
Christie Communications
@techchristie
Jun 02 2015 19:16
if you don't specify a js or css pipeline, should it be compiling either of those?
Noel Quiles
@EnMod
Jun 02 2015 19:28
There's a strange compatibility issue with the Accord master and the last two options of a space in app.coffee's config for roots-contentful
Did you catch when I posted about it wayyyyy up there? I can repost here for convenience if you like
Christie Communications
@techchristie
Jun 02 2015 19:47
starting to think that accord-master is what is causing me issues also :\
Henry Snopek
@hhsnopek
Jun 02 2015 19:48
@techchristie not specifying js or css pipeline will still compile your files, you'll just have to reference them yourself within your html files
Christie Communications
@techchristie
Jun 02 2015 19:52
ya the thing is im not
all my coffee files and styl files are being compiled regardless
seems like anything under assets/js or assets/css is compiled unless its in the ignores array
Henry Snopek
@hhsnopek
Jun 02 2015 20:04
everything will be compiled unless ignored in the ignores array located in app.coffee
js-pipeline and css-pipeline give you more functionality and shortcuts
js-pipeline & css-pipeline give you the js() & css() functions for your jade which will place the styles link/script with the path for you - they can also do much more, but they aren't needed to build a site
Christie Communications
@techchristie
Jun 02 2015 20:08
so if im using browserify, i need to ignore everything that Im not requiring?
Henry Snopek
@hhsnopek
Jun 02 2015 20:08
if you're using browserify you'll want to do something similar to this: browserify(files: "assets/js/main.coffee", out: 'js/build.js') within your extensions array
then within your js folder
prepend _ to files that are going to be required into main.coffee
for instance _auth.coffee, _settings.coffee, _views.coffee, etc
Christie Communications
@techchristie
Jun 02 2015 20:09
ok, thats kinda what i thought
Henry Snopek
@hhsnopek
Jun 02 2015 20:09
:)
Christie Communications
@techchristie
Jun 02 2015 20:09
guess i gotta rename everything :\
thanks
Henry Snopek
@hhsnopek
Jun 02 2015 20:10
you could also just ignore by folder as well
Henry Snopek
@hhsnopek
Jun 02 2015 20:17
@EnMod is this the issue? jenius/roots#643
Noel Quiles
@EnMod
Jun 02 2015 20:42

@hhsnopek that's the other issue I was having, the one I'm referring to was one I ran into afterward, here it is:

I have run roots watch on a project that caused a strange directory read error, shown here:

[Error: Error: C:\Users\quilesn\Documents\GitHub\bleig\assets\css\style.css.styl:1
  > 1| extends _layout
    2|
    3| block content
    4|  h1= entry.title

ENOENT, no such file or directory 'C:\Users\quilesn\Documents\GitHub\bleig\assets\css\_layout.jade']

Potentially unhandled rejection [4] Error: C:\Users\quilesn\Documents\GitHub\bleig\assets\css\style.css.styl:1
  > 1| extends _layout
    2|
    3| block content
    4|  h1= entry.title

ENOENT, no such file or directory 'C:\Users\quilesn\Documents\GitHub\bleig\assets\css\_layout.jade'
  at Object.fs.openSync (fs.js:427:18)
  at Object.fs.readFileSync (fs.js:284:15)
  at Parser.parseExtends (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\parser.js:488:18)
  at Parser.parseExpr (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\parser.js:221:21)
  at Parser.parse (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\parser.js:122:25)
  at parse (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\index.js:104:21)
  at Object.exports.compile (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\index.js:205:16)
  at handleTemplateCache (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\index.js:174:25)
  at Object.exports.render (C:\Users\quilesn\Documents\GitHub\bleig\node_modules\jade\lib\index.js:349:10)
  at C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\accord\lib\adapters\jade.coffee:14:24
  at compile (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\accord\lib\adapters\jade.coffee:30:15)
  at Jade._render (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\accord\lib\adapters\jade.coffee:14:5)
  at Jade.Adapter.render (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\accord\lib\adapter_base.coffee:88:6)
  at Jade.wrapper (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\lodash\index.js:3543:19)
  at tryCatchReject (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\when\lib\makePromise.js:845:30)
  at runContinuation1 (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\when\lib\makePromise.js:804:4)
  at Fulfilled.when (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\when\lib\makePromise.js:592:4)
  at Pending.run (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\when\lib\makePromise.js:483:13)
  at Scheduler._drain (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\when\lib\Scheduler.js:62:19)
  at Scheduler.drain (C:\Users\quilesn\AppData\Roaming\npm\node_modules\roots\node_modules\when\lib\Scheduler.js:27:9)
  at process._tickCallback (node.js:415:13)

I call it a directory read error because, for some reason, my assets/css turns into my views directory internally after first compile. This is confirmed by the fact that my views don't cause a recompile once saved, and that I get the above error once saving a .styl file in assets/css. you can also see that it's reading from my views while stating that my style.css.styl contains the erroneous code.

it's possible the PostCSS adapter in the Accord master is causing issues, since it's my assets/css directory that gets focused on as a path. Thoughts?

Henry Snopek
@hhsnopek
Jun 02 2015 20:43
are you able to possibly upload the repo so I may clone it down and take a closer look?
Noel Quiles
@EnMod
Jun 02 2015 20:43
Sure, one sec
well...can't do it till I get to my home machine since I had to nuke my repo for a mistaken upload of a sensitive file. Will be able to asap
Henry Snopek
@hhsnopek
Jun 02 2015 20:45
sounds good - also this might be useful next time you find yourself publishing sensitive data: https://help.github.com/articles/remove-sensitive-data/
Noel Quiles
@EnMod
Jun 02 2015 20:46
Wow...that would have saved a lot of headache, many thanks
Henry Snopek
@hhsnopek
Jun 02 2015 20:46
Always glad to help out :smile: