Electron-Lib
Some helper functions to accelerate your Electron development work
Register App Protocol
Why you need to use file protocol or local file path to locate your files? With the follow code, you can use app://views/welcome/index.html
to locate file://path/to/app/views/welcome/index.html
In app.js
const elib = elib
Window Creation and Management
const elib = require('electron-lib')const options = {width: 600, height: 400}elib.windows.createOrActivate('welcome', 'app://views/welcome/index.html', options)// some time later...elib.windows.activate('welcome')
IPC Between Browser Window and Main Process
The default ipc methods are too complex. We need just one line
// In main processconst elib = elibipc // In renderer process (browser window)ipc