Total Complexity | 3 |
Complexity/F | 1.5 |
Lines of Code | 43 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 11.11% |
Changes | 6 | ||
Bugs | 1 | Features | 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 | |||
47 |