#26 Use path.win32.basename to resolve stylesheet paths and be consistent on WIN & UNIX

This commit is contained in:
Dan Mindru 2017-02-08 16:26:05 +01:00
parent 5b907d3bf9
commit 12bffe8169
1 changed files with 5 additions and 3 deletions

View File

@ -11,7 +11,8 @@ var gulp = require('gulp'),
Q = require('q'),
del = require('del'),
jsonlint = require('jsonlint'),
inlineimg = require('gulp-inline-image-html');
inlineimg = require('gulp-inline-image-html'),
path = require('path');
function buildTask(options){
gulp.task('build', ['dupe', 'less', 'sass', 'postcss', 'lint'], function build() {
@ -44,8 +45,9 @@ function buildTask(options){
/* Read only CSS files. */
return (file.match(/.*\.css/)) ? true : false;
})
.reduce(function(prev, current, index, acc){
return prev += '<link rel="stylesheet" href="' + current + '">';
.reduce(function(prev, current, index, acc) {
var cssPath = path.win32.basename(current)
return prev += '<link rel="stylesheet" href="' + cssPath + '">';
}, '');
options