Skip to content

Commit

Permalink
Merge pull request #1 from jhnns/use-root
Browse files Browse the repository at this point in the history
Added root paths to sass's includePaths
  • Loading branch information
jtangelder committed Mar 12, 2014
2 parents 8bb7f6e + 6139b03 commit 7f8c194
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ var path = require('path');


module.exports = function(content) {
var root;

this.cacheable && this.cacheable();

var callback = this.async();
Expand All @@ -14,6 +16,10 @@ module.exports = function(content) {
// set include path to fix imports
opt.includePaths = opt.includePaths || [];
opt.includePaths.push(path.dirname(this.resourcePath));
if (this.options.resolve && this.options.resolve.root) {
root = [].concat(this.options.resolve.root);
opt.includePaths = opt.includePaths.concat(root);
}

// output compressed by default
opt.outputStyle = opt.outputStyle || 'compressed';
Expand Down

0 comments on commit 7f8c194

Please sign in to comment.