Skip to content

Commit

Permalink
fix: upload preload.js file after it was moved
Browse files Browse the repository at this point in the history
  • Loading branch information
olzzon committed Dec 3, 2019
1 parent 57cd035 commit b87c859
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions preload.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
console.log('preloading')

const remote = require('electron').remote
const { dialog } = require('electron').remote
const { getPath } = require('electron').remote.app


global.aaaasper = 'IT´s preloaded'
global.fs = remote.require('fs')
global.osc = remote.require('osc')
global.net = remote.require('net')
global.emberplus = remote.require('emberplus')
global.casparcgconnection = remote.require('casparcg-connection')
global.dialog = dialog
global.getPath = getPath
//global.SettingsStorage = './utils/SettingsStorage.ts'


console.log('PreLoad executed')

global.electron = {
ipc: {
invoke (channel, ...args) {
return ipcRenderer.invoke(channel, ...args)
},
send (msg, arg) {
ipcRenderer.send(msg, arg)
},
on (channel, cb) {
ipcRenderer.on(channel, cb)
},
off (channel, cb) {
ipcRenderer.off(channel, cb)
}
}
}

0 comments on commit b87c859

Please sign in to comment.