回调调整
This commit is contained in:
parent
9c9ad8eac9
commit
559c17ef0d
@ -48,5 +48,5 @@ function readDirSync(imageFolderPath, images, rootPath, callback, count={fileCou
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function (rootPath, imageFloder, callback) {
|
module.exports = function (rootPath, imageFloder, callback) {
|
||||||
return readDirSync(path.resolve(rootPath, imageFloder), [], rootPath, callback)
|
readDirSync(path.resolve(rootPath, imageFloder), [], rootPath, callback)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,7 +57,7 @@ gulp.task('syncImages', () => {
|
|||||||
return Promise.resolve('未获得accessKey以及accessSecret, 跳过图片同步').then(console.log)
|
return Promise.resolve('未获得accessKey以及accessSecret, 跳过图片同步').then(console.log)
|
||||||
}
|
}
|
||||||
// 同步当前本地存在的所有图片
|
// 同步当前本地存在的所有图片
|
||||||
return new Promise((resolve)=>{
|
return new Promise(resolve => {
|
||||||
listImages(`${process.cwd()}/source/`, 'images/', resolve)
|
listImages(`${process.cwd()}/source/`, 'images/', resolve)
|
||||||
}).then(imagesList => {
|
}).then(imagesList => {
|
||||||
const ImageSynchronizer = require('./deploy_utils/image_synchronize')
|
const ImageSynchronizer = require('./deploy_utils/image_synchronize')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user