From f6aa74ca9041b17adbe54185794f3095ee9f53a2 Mon Sep 17 00:00:00 2001 From: cnt1992 <418231398@qq.com> Date: Fri, 4 Dec 2015 10:40:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=B7=AF=E5=BE=84normalize?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulpfile.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index ee1c7f3..4172476 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -5,7 +5,8 @@ var gulp = require('gulp'), cssnano = require('cssnano'), yaml = require('js-yaml'), fs = require('fs'), - cfg = yaml.safeLoad(fs.readFileSync('_config.yml')); + cfg = yaml.safeLoad(fs.readFileSync('_config.yml')), + path = require('path'); require('shelljs/global'); @@ -33,6 +34,7 @@ gulp.task('useref', ['hexo'], function(){ .pipe($.useref({ searchPath:'public', transformPath: function(filePath) { + filePath = path.normalize(filePath); return filePath.replace(dirs.public + cfg.root, dirs.public + '/'); } }))