mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
index: initialize config and plugins together
This commit is contained in:
parent
622f584d15
commit
29b853fcbf
1 changed files with 4 additions and 4 deletions
8
index.js
8
index.js
|
|
@ -6,7 +6,11 @@ const genUid = require('uid2');
|
|||
const { resolve } = require('path');
|
||||
const isDev = require('electron-is-dev');
|
||||
const AutoUpdater = require('./auto-updater');
|
||||
|
||||
// set up config
|
||||
const config = require('./config');
|
||||
config.init();
|
||||
const plugins = require('./plugins');
|
||||
|
||||
if (isDev) {
|
||||
console.log('running in dev mode');
|
||||
|
|
@ -24,9 +28,6 @@ const url = 'file://' + resolve(
|
|||
|
||||
console.log('electron will open', url);
|
||||
|
||||
// initializate configuration
|
||||
config.init();
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
// by subscribing to this event and nooping
|
||||
// we prevent electron's default behavior
|
||||
|
|
@ -54,7 +55,6 @@ app.on('ready', () => {
|
|||
|
||||
const rpc = createRPC(win);
|
||||
const sessions = new Map();
|
||||
|
||||
const cfgUnsubscribe = config.subscribe(() => {
|
||||
win.webContents.send('config change');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue