renovate/lib/platform/index.js
2018-04-04 13:33:56 +02:00

20 lines
417 B
JavaScript

/* eslint-disable global-require */
const platforms = new Map([
['github', require('./github')],
['gitlab', require('./gitlab')],
['vsts', require('./vsts')],
]);
/* eslint-enable global-require */
function getPlatformApi(platform) {
return platforms.get(platform);
}
function initPlatform(platform) {
global.platform = getPlatformApi(platform);
}
module.exports = {
initPlatform,
getPlatformApi,
};