Created
June 21, 2016 15:01
-
-
Save etyp/32eefdfa8990e2346c0dd923fca519e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mainWindow = new BrowserWindow({ | |
width: size.width < 1600 ? size.width - 50: size.width - 100, | |
height: size.width < 1600 ? size.height - 50: size.height - 100, | |
title: 'Hive: Home for busy teams', | |
/** | |
* Disable Electron's Node integration so that browser dependencies like `moment` will load themselves | |
* like normal i.e. into the window rather than into modules, and also to prevent untrusted client | |
* code from having access to the process and file system: | |
* - https://github.com/atom/electron/issues/254 | |
* - https://github.com/atom/electron/issues/1753 | |
*/ | |
'web-preferences': { | |
'web-security': false, | |
nodeIntegration: false, | |
preload: path.join(__dirname, 'preload.js') | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use new namespace for require so that | |
// normal js modules can use 'require' properly. | |
ElectronRequire = require; | |
delete require; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment