import * as Action from './actions' ; const ipc = global . require ( 'ipc' ) ; export default class RepoReceiver { constructor ( ) { console . log ( 'receiver start' ) ; ipc . on ( 'repositories' , repos => Action . updateRepos ( repos ) ) ; ipc . on ( 'fetch-error' , reason => Action . notifyScrapingFailed ( reason ) ) ; ipc . on ( 'lang-colors' , colors => Action . setLangColors ( colors ) ) ; ipc . send ( 'renderer-ready' ) ; } }