File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,9 +12,19 @@ var gulp = require('gulp'),
1212// Prepare CSS
1313// ===========
1414
15+ var processWinPath = function ( file ) {
16+ // Fix for bug with paths on Windows
17+ var path = require ( 'path' ) ;
18+ if ( process . platform === 'win32' ) {
19+ file . path = path . relative ( '.' , file . path ) ;
20+ file . path = file . path . replace ( / \\ / g, '/' ) ;
21+ }
22+ } ;
23+
1524// Compile SASS and add prefixes
1625var fnSass = function ( path ) {
1726 return gulp . src ( path )
27+ . on ( 'data' , processWinPath )
1828 . pipe ( plugins . plumber ( ) )
1929 . pipe ( plugins . sass ( {
2030 sourceComments : 'map'
@@ -37,6 +47,7 @@ var fnSass = function (path) {
3747gulp . task ( 'styles:sass:imports' , function ( ) {
3848 var files = [ config . app + '/+(sass|app|common)/**/*.scss' , '!' + config . app + '/sass/includes/*.scss' , '!' + config . app + '/+(app|common)/**/_*.scss' ] ;
3949 return gulp . src ( files , { read : false } )
50+ . on ( 'data' , processWinPath )
4051 . pipe ( plugins . intercept ( function ( file ) {
4152 file . contents = new Buffer ( '@import \'' + file . path + '\';' ) ;
4253 return file ;
You can’t perform that action at this time.
0 commit comments