production refactor
This commit is contained in:
parent
92fb472e3c
commit
41528e7e27
115 changed files with 20719 additions and 22107 deletions
15
src/utils/emitter.js
Normal file
15
src/utils/emitter.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
const EventEmitter = require('events');
|
||||
|
||||
class BackgroundMitt extends EventEmitter { }
|
||||
const backgroundMitt = new BackgroundMitt();
|
||||
|
||||
const ipcEmit = (channel, payload) =>
|
||||
{
|
||||
backgroundMitt.emit('ipc-renderer', {
|
||||
channel,
|
||||
payload
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.backgroundMitt = backgroundMitt;
|
||||
module.exports.ipcEmit = ipcEmit;
|
||||
5
src/utils/store.js
Normal file
5
src/utils/store.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
const Store = require("electron-store");
|
||||
|
||||
module.exports = new Store({
|
||||
encryptionKey: "super user test"
|
||||
});
|
||||
Loading…
Reference in a new issue