Permalink
Browse files

Added `includePaths` to sass.render to ensure proper relative paths t…

…o mincer environment.
  • Loading branch information...
1 parent 5d9d0f0 commit 95d70549f869dd65e69232f6af7546dd943540fe @joshuairl joshuairl committed Mar 26, 2013
Showing with 6 additions and 1 deletion.
  1. +5 −1 lib/mincer/engines/sass_engine.js
  2. +1 −0 package.json
@@ -15,6 +15,8 @@
'use strict';
+// stdlib
+var path = require('path');
// 3rd-party
var sass; // initialized later
@@ -52,7 +54,9 @@ SassEngine.prototype.initializeEngine = function () {
// Render data
SassEngine.prototype.evaluate = function (context, locals, callback) {
/*jshint unused:false*/
- sass.render(this.data, callback);
+ sass.render(this.data, callback,{
+ 'includePaths':[path.dirname(this.file)].concat(context.environment.paths)
+ });
};
View
@@ -33,6 +33,7 @@
"haml-coffee" : "*",
"jade" : "*",
"less" : "*",
+ "node-sass" : "*",
"stylus" : "*"
},
"engines" : { "node": ">= 0.6.0" }

0 comments on commit 95d7054

Please sign in to comment.