Merge pull request #5332 from pitaj/async@2

async v2 upgrade
This commit is contained in:
Julian Lam
2017-01-04 11:05:45 -05:00
committed by GitHub
12 changed files with 81 additions and 50 deletions

View File

@@ -31,9 +31,7 @@ module.exports = function (Plugins) {
return path.join(__dirname, '../../node_modules/', plugin);
});
async.filter(plugins, file.exists, function (plugins) {
next(null, plugins);
});
async.filter(plugins, file.exists, next);
},
], callback);
};
@@ -162,13 +160,13 @@ module.exports = function (Plugins) {
var realPath = pluginData.staticDirs[mappedPath];
var staticDir = path.join(pluginPath, realPath);
file.exists(staticDir, function (exists) {
file.exists(staticDir, function (err, exists) {
if (exists) {
Plugins.staticDirs[pluginData.id + '/' + mappedPath] = staticDir;
} else {
winston.warn('[plugins/' + pluginData.id + '] Mapped path \'' + mappedPath + ' => ' + staticDir + '\' not found.');
}
callback();
callback(err);
});
}
}