From 0cfdf7c5937ae580e0e71f63411f6ce5a88ddfca Mon Sep 17 00:00:00 2001 From: Maskim Burnin Date: Sun, 22 Jan 2017 17:59:05 +0500 Subject: [PATCH 1/4] Using path.normalize and path.sep to overcome windows issues Fixes #37 --- lib/broccoli_sass_compiler.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/broccoli_sass_compiler.js b/lib/broccoli_sass_compiler.js index f4c2c3f..3414b7f 100644 --- a/lib/broccoli_sass_compiler.js +++ b/lib/broccoli_sass_compiler.js @@ -485,7 +485,7 @@ BroccoliSassCompiler.prototype.handleCacheHit = function(details, inputAndOutput BroccoliSassCompiler.prototype.scopedFileName = function(file) { file = this.relativize(file); if (this.treeName) { - return this.treeName + "/" + file; + return this.treeName + path.sep + file; } else { return file; } @@ -679,6 +679,9 @@ BroccoliSassCompiler.prototype.filesInTree = function(srcPath) { this.sourceFiles.forEach(function(sourceFile) { var pattern = path.join(srcPath, sassDir, sourceFile); files = files.concat(glob.sync(pattern)); + files = files.map(function(rawPath){ + return path.normalize(rawPath); + }); }); return unique(files); }; From 454073ed50308ad7d184f3ff76f6d0c56291877a Mon Sep 17 00:00:00 2001 From: Maskim Burnin Date: Sun, 22 Jan 2017 18:04:32 +0500 Subject: [PATCH 2/4] removed trailing space to pass lint --- lib/broccoli_sass_compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/broccoli_sass_compiler.js b/lib/broccoli_sass_compiler.js index 3414b7f..a07d5b8 100644 --- a/lib/broccoli_sass_compiler.js +++ b/lib/broccoli_sass_compiler.js @@ -679,7 +679,7 @@ BroccoliSassCompiler.prototype.filesInTree = function(srcPath) { this.sourceFiles.forEach(function(sourceFile) { var pattern = path.join(srcPath, sassDir, sourceFile); files = files.concat(glob.sync(pattern)); - files = files.map(function(rawPath){ + files = files.map(function(rawPath){ return path.normalize(rawPath); }); }); From 6ec456c22fbcc1650897e76db5221a83f7c9d796 Mon Sep 17 00:00:00 2001 From: Maskim Burnin Date: Sun, 22 Jan 2017 19:00:16 +0500 Subject: [PATCH 3/4] the fix should work for discover: true as well as discover: false --- lib/broccoli_sass_compiler.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/broccoli_sass_compiler.js b/lib/broccoli_sass_compiler.js index a07d5b8..b716a5a 100644 --- a/lib/broccoli_sass_compiler.js +++ b/lib/broccoli_sass_compiler.js @@ -679,10 +679,12 @@ BroccoliSassCompiler.prototype.filesInTree = function(srcPath) { this.sourceFiles.forEach(function(sourceFile) { var pattern = path.join(srcPath, sassDir, sourceFile); files = files.concat(glob.sync(pattern)); - files = files.map(function(rawPath){ - return path.normalize(rawPath); - }); }); + + files = files.map(function(rawPath){ + return path.normalize(rawPath); + }); + return unique(files); }; From aee71d99ea1783feda8427928f3ff64d100d7123 Mon Sep 17 00:00:00 2001 From: Maskim Burnin Date: Tue, 20 Jun 2017 00:57:14 +0500 Subject: [PATCH 4/4] Update broccoli_sass_compiler.js --- lib/broccoli_sass_compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/broccoli_sass_compiler.js b/lib/broccoli_sass_compiler.js index b716a5a..e249b27 100644 --- a/lib/broccoli_sass_compiler.js +++ b/lib/broccoli_sass_compiler.js @@ -485,7 +485,7 @@ BroccoliSassCompiler.prototype.handleCacheHit = function(details, inputAndOutput BroccoliSassCompiler.prototype.scopedFileName = function(file) { file = this.relativize(file); if (this.treeName) { - return this.treeName + path.sep + file; + return path.join(this.treeName, file); } else { return file; }