falcor-electron

0.2.0 • Public • Published

falcor-electron

Build Status

Falcor integration for electron using the ipc module.

Usage

Install from npm.

npm install --save falcor-electron

Install your Router as a data source in the main process.

import ipc from 'ipc';
import Router from 'falcor-router';
import { installIpcHandler } from 'falcor-electron';
 
installIpcHandler(ipc, () => {
  return new Router([
    // ... routes
  ]);
});

Configure your Model with an IpcDataSource in the renderer process.

import ipc from 'ipc';
import { Model } from 'falcor';
import { createIpcDataSource } from 'falcor-electron';
 
const model = new Model({
  source: createIpcDataSource(ipc)
});

Contributing

Feature requests and bugs/bug fixes are happily accepted and can be submitted either as issues or pull requests.

  • Source is compiled with babel
    • Presets:
      • es2015
      • stage-1
  • Source is linted with eslint
  • Tests are run with tape

For code contributions, please fork develop and submit a PR.

Readme

Keywords

none

Package Sidebar

Install

npm i falcor-electron

Weekly Downloads

5

Version

0.2.0

License

MIT

Last publish

Collaborators

  • lukewestby