hyper/app/lib/utils/config.js

14 lines
316 B
JavaScript
Raw Normal View History

2016-07-13 12:44:24 -08:00
import { ipcRenderer, remote } from 'electron';
const plugins = remote.require('./plugins');
2016-07-13 12:44:24 -08:00
export function getConfig () {
return plugins.getDecoratedConfig();
2016-07-13 12:44:24 -08:00
}
export function subscribe (fn) {
ipcRenderer.on('config change', fn);
return () => {
ipcRenderer.removeListener('config change', fn);
};
}