[Constants] Pre-minify init vars

pull/66/head
Oj 2 years ago
parent 99f146ea86
commit fd6274bb95

@ -1,15 +1,14 @@
const titleCase = s => s[0].toUpperCase() + s.slice(1);
const appNameSuffix = releaseChannel === 'stable' ? '' : titleCase(releaseChannel);
const APP_NAME = 'Discord' + appNameSuffix;
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)
module.exports = {
APP_COMPANY: 'Discord Inc',
APP_DESCRIPTION: 'Discord - https://discord.com',
APP_NAME,
APP_NAME_FOR_HUMANS: 'Discord' + (appNameSuffix !== '' ? ' ' + appNameSuffix : ''),
APP_ID: [ 'com', 'squirrel', APP_NAME, APP_NAME ].join('.'),
APP_NAME: n,
APP_NAME_FOR_HUMANS: 'Discord' + (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/',

Loading…
Cancel
Save