Restore includePaths logic

I believe this was mistakenly removed in #353.

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

Fixes #469
Fixes #473
This commit is contained in:
xzyfer 2016-04-21 23:49:31 +10:00
parent 439035f380
commit 1d72ed3fc1

View file

@ -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;