[Constants] Pre-minify init vars
This commit is contained in:
parent
99f146ea86
commit
fd6274bb95
1 changed files with 6 additions and 7 deletions
|
@ -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…
Reference in a new issue