[Constants] Modularize via product and domain vars
This commit is contained in:
parent
72842faf85
commit
1827f4a783
1 changed files with 10 additions and 7 deletions
|
@ -1,16 +1,19 @@
|
|||
const p = 'Discord'; // Product name
|
||||
const d = 'https://discord.com'; // Domain
|
||||
|
||||
const r = releaseChannel; // Release channel
|
||||
const s = r === 'stable' ? '' : (r[0].toUpperCase() + r.slice(1)); // Suffix per release channel (stable = blank, canary = Canary, etc)
|
||||
const n = 'Discord' + s; // Name as Discord<Channel> (if not stable)
|
||||
const n = p + s; // Name as Discord<Channel> (if not stable)
|
||||
|
||||
|
||||
module.exports = {
|
||||
APP_COMPANY: 'Discord Inc',
|
||||
APP_DESCRIPTION: 'Discord - https://discord.com',
|
||||
APP_DESCRIPTION: p + ' - ' + d,
|
||||
APP_NAME: n,
|
||||
APP_NAME_FOR_HUMANS: 'Discord' + (s !== '' ? ' ' + s : ''),
|
||||
APP_NAME_FOR_HUMANS: p + (s !== '' ? ' ' + s : ''),
|
||||
APP_ID: [ 'com', 'squirrel', n, n ].join('.'),
|
||||
APP_PROTOCOL: 'Discord',
|
||||
API_ENDPOINT: settings.get('API_ENDPOINT') || 'https://discord.com/api',
|
||||
NEW_UPDATE_ENDPOINT: settings.get('NEW_UPDATE_ENDPOINT') || 'https://discord.com/api/updates/',
|
||||
UPDATE_ENDPOINT: settings.get('UPDATE_ENDPOINT') || 'https://discord.com/api'
|
||||
APP_PROTOCOL: p,
|
||||
API_ENDPOINT: settings.get('API_ENDPOINT') || (d + '/api'),
|
||||
NEW_UPDATE_ENDPOINT: settings.get('NEW_UPDATE_ENDPOINT') || (d + '/api/updates/'),
|
||||
UPDATE_ENDPOINT: settings.get('UPDATE_ENDPOINT') || (d + '/api')
|
||||
};
|
Loading…
Reference in a new issue