forked from novasamatech/nova-spektr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.config.js
52 lines (42 loc) · 1.32 KB
/
app.config.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
const { name: NAME, author: AUTHOR, version: VERSION, description: DESCRIPTION } = require('./package.json');
const AUTHOR_IN_KEBAB_CASE = AUTHOR.name.replace(/\s+/g, '-');
const titleProd = 'Nova Spektr';
const titleStage = 'Nova Spektr Stage';
const idProd = `com.${AUTHOR_IN_KEBAB_CASE}.${NAME}`.toLowerCase();
const idStage = `com.${AUTHOR_IN_KEBAB_CASE}.${NAME}.stage`.toLowerCase();
const protocolProd = NAME.replace('-', '');
const protocolStage = `${NAME.replace('-', '')}-stage`;
module.exports = {
APP_CONFIG: {
NAME,
AUTHOR,
VERSION,
DESCRIPTION,
ELECTRON_PROTOCOL: process.env.NODE_ENV === 'stage' ? protocolStage : protocolProd,
TITLE: process.env.NODE_ENV === 'stage' ? titleStage : titleProd,
APP_ID: process.env.NODE_ENV === 'stage' ? idStage : idProd,
MAIN: {
WINDOW: {
WIDTH: 1024,
HEIGHT: 800,
},
},
RENDERER: {
DEV_SERVER: {
URL: 'https://localhost',
PORT: '3000',
},
},
FOLDERS: {
ENTRY_POINTS: {
MAIN: 'src/main/index.ts',
BRIDGE: 'src/main/shared/bridge.ts',
RENDERER: 'src/renderer/app/index.tsx',
},
INDEX_HTML: 'src/renderer/app/index.html',
RESOURCES: 'src/main/resources',
DEV_BUILD: 'release/build/',
PROD_BUILD: 'release/dist/',
},
},
};