Created
April 13, 2019 18:48
-
-
Save w-jerome/b68334dc4e57fe570a411b21709bc2e6 to your computer and use it in GitHub Desktop.
Electron - Import Electron renderer with ES6 synthax
This file contains hidden or 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
| const electron = window.require('electron'); | |
| const clipboard = electron.clipboard; | |
| const crashReporter = electron.crashReporter; | |
| const desktopCapturer = electron.desktopCapturer; | |
| const ipcRenderer = electron.ipcRenderer; | |
| const nativeImage = electron.nativeImage; | |
| const remote = electron.remote; | |
| const screen = electron.screen; | |
| const shell = electron.shell; | |
| const webFrame = electron.webFrame; | |
| export default electron | |
| export { clipboard, crashReporter, desktopCapturer, ipcRenderer, nativeImage, remote, screen, shell, webFrame } | |
This file contains hidden or 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
| import electron from './electron' | |
| import { ipcRenderer, remote } from './electron' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment