1

I'm using the connect-assets module in a node app and cannot get it to work with sass using the node-sass module. I can get it to work with coffee script great.

In my server.coffee file I have

require "node-sass"

connectAssets = require 'connect-assets'

@_app.use connectAssets(src: __dirname + "/app/assets", jsDir: 'js', cssDir: 'css')

In my jade view I have: != css('reset')

I get the following error on page load: "No file found for route css/reset.css" This is the only sass file I've dropped in for testing and it's named per the documentation guides: reset.css.scss

I followed the exact same process for coffee files on the front end and it works great. I've also tried this with the less module as well and I get the same result. I'm I missing a step here? What little documentation I can find on this process makes it sound like a pretty trivial task to do so I'm not quite sure what I'm doing wrong.

HomeBrew
  • 849
  • 2
  • 12
  • 25
  • What version of connect-assets are you using? – Andrew Dunkman Jan 31 '14 at 01:04
  • I've got version 2.5.4 installed which I'm pretty sure is the latest version and the one that should work with SASS. I installed the less module to try it with that and it worked perfectly but I can't get it going with SASS. Any help is much appreciated, we're moving some big Java apps into node at work and all the styling is in SASS. – HomeBrew Jan 31 '14 at 03:38

1 Answers1

2

Unfortunately, connect-assets 2.x doesn’t support SASS. If you were feeling adventurous, you could add a compiler function for it like this LESS method.

Fortunately, SASS is supported in connect-assets 3.x — which is currently in alpha.

Andrew Dunkman
  • 1,131
  • 2
  • 8
  • 18