Use path.dirname for enhanced readability

This commit is contained in:
Martin O'Connor 2015-07-30 22:26:15 -04:00
parent 936518d258
commit 77e66a795a

View file

@ -79,9 +79,7 @@ var gulpSass = function gulpSass(options, sync) {
// Grab the base file name that's being worked on
sassFileSrc = file.relative;
// Grab the path portion of the file that's being worked on
sassFileSrcPath = sassFileSrc.split(path.sep);
sassFileSrcPath.pop();
sassFileSrcPath = sassFileSrcPath.join(path.sep);
sassFileSrcPath = path.dirname(sassFileSrc);
if (sassFileSrcPath) {
//Prepend the path to all files in the sources array except the file that's being worked on
for (sourceFileIndex = 0; sourceFileIndex < sassMap.sources.length; sourceFileIndex++) {