Merge pull request #5542 from stevekinney/standardize-requires

Standardize requires
This commit is contained in:
Cheng Zhao 2016-05-16 10:42:12 +09:00
commit ecbb088ea6
7 changed files with 11 additions and 18 deletions

View file

@ -1,7 +1,6 @@
'use strict' 'use strict'
const app = require('electron').app const {app, BrowserWindow} = require('electron')
const BrowserWindow = require('electron').BrowserWindow
const binding = process.atomBinding('dialog') const binding = process.atomBinding('dialog')
const v8Util = process.atomBinding('v8_util') const v8Util = process.atomBinding('v8_util')

View file

@ -1,6 +1,6 @@
'use strict' 'use strict'
const ipcMain = require('electron').ipcMain const {ipcMain} = require('electron')
// The history operation in renderer is redirected to browser. // The history operation in renderer is redirected to browser.
ipcMain.on('ELECTRON_NAVIGATION_CONTROLLER', function (event, method, ...args) { ipcMain.on('ELECTRON_NAVIGATION_CONTROLLER', function (event, method, ...args) {

View file

@ -1,5 +1,5 @@
const EventEmitter = require('events').EventEmitter const {EventEmitter} = require('events')
const powerMonitor = process.atomBinding('power_monitor').powerMonitor const {powerMonitor} = process.atomBinding('power_monitor')
Object.setPrototypeOf(powerMonitor, EventEmitter.prototype) Object.setPrototypeOf(powerMonitor, EventEmitter.prototype)

View file

@ -1,5 +1 @@
var powerSaveBlocker module.exports = process.atomBinding('power_save_blocker').powerSaveBlocker
powerSaveBlocker = process.atomBinding('power_save_blocker').powerSaveBlocker
module.exports = powerSaveBlocker

View file

@ -1,5 +1,5 @@
const EventEmitter = require('events').EventEmitter const {EventEmitter} = require('events')
const screen = process.atomBinding('screen').screen const {screen} = process.atomBinding('screen')
Object.setPrototypeOf(screen, EventEmitter.prototype) Object.setPrototypeOf(screen, EventEmitter.prototype)

View file

@ -1,5 +1,5 @@
const EventEmitter = require('events').EventEmitter const {EventEmitter} = require('events')
const Tray = process.atomBinding('tray').Tray const {Tray} = process.atomBinding('tray')
Object.setPrototypeOf(Tray.prototype, EventEmitter.prototype) Object.setPrototypeOf(Tray.prototype, EventEmitter.prototype)

View file

@ -1,9 +1,7 @@
'use strict' 'use strict'
const EventEmitter = require('events').EventEmitter const {EventEmitter} = require('events')
const ipcMain = require('electron').ipcMain const {ipcMain, Menu, NavigationController} = require('electron')
const NavigationController = require('electron').NavigationController
const Menu = require('electron').Menu
const binding = process.atomBinding('web_contents') const binding = process.atomBinding('web_contents')
const debuggerBinding = process.atomBinding('debugger') const debuggerBinding = process.atomBinding('debugger')