Skip to content

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.

Notifications You must be signed in to change notification settings

jcblw/ipc-electron-dispatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPC Electron Dispatcher

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.

Build Status

Install

npm i ipc-electron-dispatcher -S

Usage

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 ^^ 😄

Contributing

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.

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published