Total Complexity | 3 |
Complexity/F | 1.5 |
Lines of Code | 33 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 12.5% |
Changes | 7 | ||
Bugs | 1 | Features | 0 |
1 | "use strict"; |
||
2 | |||
3 | /* eslint-disable no-unused-vars */ |
||
4 | |||
5 | const { |
||
6 | app |
||
7 | } = require('electron'); |
||
8 | |||
9 | const mainWindow = require('./files/js/mainWindow'); |
||
10 | |||
11 | |||
12 | // This method will be called when Electron has finished |
||
13 | // initialization and is ready to create browser windows. |
||
14 | // Some APIs can only be used after this event occurs. |
||
15 | app.on('ready', mainWindow.createWindow); |
||
16 | |||
17 | // Quit when all windows are closed. |
||
18 | app.on('window-all-closed', () => { |
||
19 | // On OS X it is common for applications and their menu bar |
||
20 | // to stay active until the user quits explicitly with Cmd + Q |
||
21 | // if (process.platform !== 'darwin') { |
||
22 | // app.quit(); |
||
23 | // } |
||
24 | app.quit(); |
||
25 | }); |
||
26 | |||
27 | app.on('activate', () => { |
||
28 | // On OS X it's common to re-create a window in the app when the |
||
29 | // dock icon is clicked and there are no other windows open. |
||
30 | 2 | if (mainWindow === null) { |
|
31 | mainWindow.createWindow(); |
||
32 | } |
||
33 | }); |
||
34 | |||
37 |