0.2.0 • Published 10 years ago
falcor-electron v0.2.0
falcor-electron
Falcor integration for
electron using the ipc module.
Usage
Install from npm.
npm install --save falcor-electronInstall 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:
es2015stage-1
- Presets:
- Source is linted with
eslint - Tests are run with
tape
For code contributions, please fork develop and submit a PR.