// get files ndir.walk(srcPath, function onDir(dirpath, files) { for (var i = 0, l = files.length; i < l; i++) { var info = files[i]; if (info[1].isFile()) { if (config.src) { upload(info[1], info[0].substring(srcPath.length), info[0]); } else { upload(info[1], info[0].substring(info[0].indexOf(config.distDirName)), info[0]); } } } }, function end() { if (tasks.length !== 0) { Q.allSettled(tasks) .then(function (fulfilled) { log('Upload to qcloud: Total:', chalk.green(fulfilled.length), 'Skip:', chalk.gray(existFiles), 'Upload:', chalk.green(uploadedFiles), 'Failed:', chalk.red(uploadedFail)); }, function (err) { log('Failed upload files:', err); }); } }, function error(err, errPath) { log(chalk.red('Please you check your Dir option, and use absolute path.')); log('err: ', errPath, ' error: ', err); });
return q.allSettled(promises);
destPromises.push(BruffProcessor._doTask(destinations[i], context)); Q.allSettled(destPromises) .done(function (responses) { for (var i = 0; i < responses.length; i++) {
promises.push(createLabel(label)); }); return q.allSettled(promises);
Q.allSettled(tasks) .then(function (fulfilled) { log('Upload to qcloud: Total:', colors.green(fulfilled.length),
Q.allSettled([ Q.nfcall(fs.readFile, askedFilePath, 'utf-8'), Q.nfcall(fs.readFile, cachedFilePath, 'utf-8')
return q.allSettled(promises);