This is just the flux dispatcher wrapped with a small amount of code to allow it to speak to both the renderer process as well as the main process of a Electron app.
npm i ipc-electron-dispatcher -S
You still need to make your own instance of the dispatcher
// dispatcher.js
const IPCDispatcher = require('ipc-electron-dispatcher')
const dispatcher = new IPCDispatcher()
module.exports = dispatcher
Now you may require/register/dispatch from either the main process or the renderer process and the action should propagate to both processes
Currently this only supports on window applications and will only speak to window after they have attempted to speak to the dispatcher first
Since the dispatchers are in different processes they will have different data sets for registered callbacks
Patches welcome ^^ 😄
Right now the only two things are src
files are the main source file and get compiled into the lib
dir using npm run build
. And we use standardjs, so by running npm test
you can test if you code is compliant.