Merge pull request #5542 from stevekinney/standardize-requires
Standardize requires
This commit is contained in:
		
				commit
				
					
						ecbb088ea6
					
				
			
		
					 7 changed files with 11 additions and 18 deletions
				
			
		| 
						 | 
				
			
			@ -1,7 +1,6 @@
 | 
			
		|||
'use strict'
 | 
			
		||||
 | 
			
		||||
const app = require('electron').app
 | 
			
		||||
const BrowserWindow = require('electron').BrowserWindow
 | 
			
		||||
const {app, BrowserWindow} = require('electron')
 | 
			
		||||
const binding = process.atomBinding('dialog')
 | 
			
		||||
const v8Util = process.atomBinding('v8_util')
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
'use strict'
 | 
			
		||||
 | 
			
		||||
const ipcMain = require('electron').ipcMain
 | 
			
		||||
const {ipcMain} = require('electron')
 | 
			
		||||
 | 
			
		||||
// The history operation in renderer is redirected to browser.
 | 
			
		||||
ipcMain.on('ELECTRON_NAVIGATION_CONTROLLER', function (event, method, ...args) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
const EventEmitter = require('events').EventEmitter
 | 
			
		||||
const powerMonitor = process.atomBinding('power_monitor').powerMonitor
 | 
			
		||||
const {EventEmitter} = require('events')
 | 
			
		||||
const {powerMonitor} = process.atomBinding('power_monitor')
 | 
			
		||||
 | 
			
		||||
Object.setPrototypeOf(powerMonitor, EventEmitter.prototype)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1 @@
 | 
			
		|||
var powerSaveBlocker
 | 
			
		||||
 | 
			
		||||
powerSaveBlocker = process.atomBinding('power_save_blocker').powerSaveBlocker
 | 
			
		||||
 | 
			
		||||
module.exports = powerSaveBlocker
 | 
			
		||||
module.exports = process.atomBinding('power_save_blocker').powerSaveBlocker
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
const EventEmitter = require('events').EventEmitter
 | 
			
		||||
const screen = process.atomBinding('screen').screen
 | 
			
		||||
const {EventEmitter} = require('events')
 | 
			
		||||
const {screen} = process.atomBinding('screen')
 | 
			
		||||
 | 
			
		||||
Object.setPrototypeOf(screen, EventEmitter.prototype)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
const EventEmitter = require('events').EventEmitter
 | 
			
		||||
const Tray = process.atomBinding('tray').Tray
 | 
			
		||||
const {EventEmitter} = require('events')
 | 
			
		||||
const {Tray} = process.atomBinding('tray')
 | 
			
		||||
 | 
			
		||||
Object.setPrototypeOf(Tray.prototype, EventEmitter.prototype)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,9 +1,7 @@
 | 
			
		|||
'use strict'
 | 
			
		||||
 | 
			
		||||
const EventEmitter = require('events').EventEmitter
 | 
			
		||||
const ipcMain = require('electron').ipcMain
 | 
			
		||||
const NavigationController = require('electron').NavigationController
 | 
			
		||||
const Menu = require('electron').Menu
 | 
			
		||||
const {EventEmitter} = require('events')
 | 
			
		||||
const {ipcMain, Menu, NavigationController} = require('electron')
 | 
			
		||||
 | 
			
		||||
const binding = process.atomBinding('web_contents')
 | 
			
		||||
const debuggerBinding = process.atomBinding('debugger')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue