-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgames.js
54 lines (50 loc) · 1.21 KB
/
games.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
function toPascalCase(s) {
return s.replace(/(\w)(\w*)/g, function (g0, g1, g2) {
return g1.toUpperCase() + g2.toLowerCase();
});
};
const templates = {
API_TS: {
name: 'template-api-ts',
secrets: [
'NPM_TOKEN',
'GH_TOKEN'
]
},
API_CSHARP: {
name: 'template-api-csharp',
secrets: [
'NUGET_AUTH_TOKEN'
]
}
}
function getGameLibraries(game) {
return [
{
template: templates.API_CSHARP,
name: `${game}-csharp-game-api`,
projectName: `${toPascalCase(game)}GameAPI`,
description: `Game API library for ${game}`,
asyncapiFile: `${game}.asyncapi.json`,
},
{
template: templates.API_CSHARP,
name: `${game}-csharp-public-api`,
projectName: `${toPascalCase(game)}PublicAPI`,
description: `C# public API wrapper for ${game}`,
asyncapiFile: `${game}_public.asyncapi.json`
},
{
template: templates.API_TS,
name: `${game}-ts-public-api`,
description: `TypeScript public API wrapper for ${game}`,
asyncapiFile: `${game}_public.asyncapi.json`
}
]
}
module.exports = {
"rust": {
website: 'https://gamingapi.org/platform/games/rust',
repos: getGameLibraries("rust")
}
};