Skip to content

Commit

Permalink
Merge pull request #29 from coreequip/master
Browse files Browse the repository at this point in the history
Fixed tests and compatibility with bourbon. See issue #27
  • Loading branch information
iamlacroix committed Mar 19, 2016
2 parents bdd07e2 + e0abe23 commit 1ca8151
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
15 changes: 4 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
@@ -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);
}

};
};
7 changes: 5 additions & 2 deletions test/with_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});
Expand All @@ -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();
});
});
Expand All @@ -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();
});
});
Expand Down

0 comments on commit 1ca8151

Please sign in to comment.