Passed
Push — master ( 50e407...d83b42 )
by Magnus
20:39 queued 19:12
created

main.js   A

Complexity

Total Complexity 3
Complexity/F 1.5

Size

Lines of Code 43
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 11.11%

Importance

Changes 6
Bugs 1 Features 0
Metric Value
cc 0
wmc 3
c 6
b 1
f 0
nc 1
mnd 1
bc 3
fnc 2
dl 0
loc 43
ccs 1
cts 9
cp 0.1111
crap 0
rs 10
bpm 1.5
cpm 1.5
noi 0
1
"use strict";
2
3
/* eslint-disable no-unused-vars */
4
5
const {
6
    app
7
} = require('electron');
8
9
import {
10
    enableLiveReload
11
} from 'electron-compile';
12
13
const mainWindow = require('./files/js/mainWindow');
14
15
16
17
18
enableLiveReload();
19
20
21
22
// This method will be called when Electron has finished
23
// initialization and is ready to create browser windows.
24
// Some APIs can only be used after this event occurs.
25
app.on('ready', mainWindow.createWindow);
26
27
// Quit when all windows are closed.
28
app.on('window-all-closed', () => {
29
    // On OS X it is common for applications and their menu bar
30
    // to stay active until the user quits explicitly with Cmd + Q
31
    // if (process.platform !== 'darwin') {
32
    //     app.quit();
33
    // }
34
    app.quit();
35
});
36
37
app.on('activate', () => {
38
    // On OS X it's common to re-create a window in the app when the
39
    // dock icon is clicked and there are no other windows open.
40 2
    if (mainWindow === null) {
41
        mainWindow.createWindow();
42
    }
43
});
44
45
// In this file you can include the rest of your app's specific main process
46
// code. You can also put them in separate files and require them here.
47