From 34c8be00351b769bdc1579495eb9722914a0764f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=93=E5=8F=91=E5=8F=97=E9=95=BF=E7=94=9F?= Date: Tue, 16 Jul 2019 22:59:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E7=89=87=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulpfile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 10ec6c3..1ea4811 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -58,8 +58,9 @@ gulp.task('syncImages', () => { return Promise.resolve('未获得accessKey以及accessSecret, 跳过图片同步').then(console.log) } // 同步当前本地存在的所有图片 + const rootPath = `${process.cwd()}/` return new Promise(resolve => { - listImages(`${process.cwd()}/`, 'images/', resolve) + listImages(rootPath, 'images/', resolve) }).then(imagesList => { const ImageSynchronizer = require('./deploy_utils/image_synchronize') const nosSetting = { @@ -68,7 +69,7 @@ gulp.task('syncImages', () => { accessKey: argv.accessKey, accessSecret: argv.accessSecret } - const imageSynchronizer = new ImageSynchronizer(nosSetting, imagesList, `${process.cwd()}/source/`) + const imageSynchronizer = new ImageSynchronizer(nosSetting, imagesList, rootPath) return imageSynchronizer.synchronize('images/') }) })