diff --git a/index.js b/index.js index 104c0cd..17a62ba 100644 --- a/index.js +++ b/index.js @@ -1,20 +1,13 @@ var path = require('path'); -var bourbonEntryPoint = require.resolve('bourbon'); - -var bourbonDir = path.dirname(bourbonEntryPoint); - -function includePaths() { - return [bourbonDir]; -} +var bourbon = require('bourbon'); module.exports = { - includePaths: includePaths(), + includePaths: [bourbon.includePaths], with: function() { var paths = Array.prototype.slice.call(arguments); - var result = [].concat.apply(includePaths(), paths); - return result; + return [].concat.apply([bourbon.includePaths], paths); } -}; +}; \ No newline at end of file diff --git a/test/with_test.js b/test/with_test.js index f44bf79..3baedf4 100644 --- a/test/with_test.js +++ b/test/with_test.js @@ -21,6 +21,7 @@ describe('#with function', function() { includePaths: bourbon.with(partialsDir('dir1'), partialsDir('dir2'), partialsDir('dir3')), error: errorHandler }, function(err, res) { + if (err) return done(err); done(); }); }); @@ -30,7 +31,8 @@ describe('#with function', function() { file: __dirname + '/fixtures/concat.scss', includePaths: bourbon.with([partialsDir('dir1')], [partialsDir('dir2')], [partialsDir('dir3')]), error: errorHandler - }, function() { + }, function(err, res) { + if (err) return done(err); done(); }); }); @@ -40,7 +42,8 @@ describe('#with function', function() { file: __dirname + '/fixtures/concat.scss', includePaths: bourbon.with([partialsDir('dir1'), partialsDir('dir2')], partialsDir('dir3')), error: errorHandler - }, function() { + }, function(err, res) { + if (err) return done(err); done(); }); });