Skip to content

Commit

Permalink
Restore includePaths logic
Browse files Browse the repository at this point in the history
I believe this was mistakenly removed in dlmanning#353.

@eoneill can you shed some light on why you removed this? It has
caused issues for users.

Fixes dlmanning#469
Fixes dlmanning#473
  • Loading branch information
xzyfer committed Apr 21, 2016
1 parent 439035f commit 1d72ed3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ var gulpSass = function gulpSass(options, sync) {
opts.indentedSyntax = true;
}

// Ensure file's parent directory in the include path
if (opts.includePaths) {
if (typeof opts.includePaths === 'string') {
opts.includePaths = [opts.includePaths];
}
}
else {
opts.includePaths = [];
}

opts.includePaths.unshift(path.dirname(file.path));

// Generate Source Maps if plugin source-map present
if (file.sourceMap) {
opts.sourceMap = file.path;
Expand Down

0 comments on commit 1d72ed3

Please sign in to comment.