import Vue from 'vue' ; const path = require ( 'path' ) ; const requireComponent = require . context ( '../components/public' , true , /\.vue$/ ) ; requireComponent . keys ( ) . forEach ( ( fileName ) => { const componentConfig = requireComponent ( fileName ) ; const componentName = path . basename ( fileName ) . replace ( /\.vue$/ , '' ) ; Vue . component ( componentName . replace ( /\// , '-' ) , componentConfig . default || componentConfig ) ; } ) ; Vue . prototype . $cookie = require ( './cookie' ) ; if ( ! ! process . versions ) { const electron = require ( 'electron' ) ; const ipcRenderer = electron . ipcRenderer ; Vue . prototype . $electron = electron ; Vue . prototype . $ipc = ipcRenderer ; } Vue . prototype . $notify = function ( msg , title ) { const notification = { title : title , body : msg , icon : require ( '../assets/logo.png' ) , } ; return new window . Notification ( notification . title , notification ) ; } ;