-var EventEmitter, Menu, app, appPath, bindings, deprecate, downloadItemBindings, fn, i, len, name, ref, ref1, session, wrapDownloadItem,
- slice = [].slice;
-
-ref = require('electron'), deprecate = ref.deprecate, session = ref.session, Menu = ref.Menu;
-
-EventEmitter = require('events').EventEmitter;
-
-bindings = process.atomBinding('app');
-
-downloadItemBindings = process.atomBinding('download_item');
-
-app = bindings.app;
+const deprecate = require('electron').deprecate;
+const session = require('electron').session;
+const Menu = require('electron').Menu;
+const EventEmitter = require('events').EventEmitter;
+
+const bindings = process.atomBinding('app');
+const downloadItemBindings = process.atomBinding('download_item');
+const app = bindings.app;
+
+var slice = [].slice;
+
+var appPath;
+var fn;
+var i;
+var len;
+var name;
+var ref1;
+var wrapDownloadItem;
app.__proto__ = EventEmitter.prototype;
-var autoUpdater, deprecate;
-
-deprecate = require('electron').deprecate;
-
-autoUpdater = process.platform === 'win32' ? require('./auto-updater/auto-updater-win') : require('./auto-updater/auto-updater-native');
+const deprecate = require('electron').deprecate;
+const autoUpdater = process.platform === 'win32' ? require('./auto-updater/auto-updater-win') : require('./auto-updater/auto-updater-native');
// Deprecated.
deprecate.rename(autoUpdater, 'setFeedUrl', 'setFeedURL');
-var EventEmitter, autoUpdater;
-
-EventEmitter = require('events').EventEmitter;
-
-autoUpdater = process.atomBinding('auto_updater').autoUpdater;
+const EventEmitter = require('events').EventEmitter;
+const autoUpdater = process.atomBinding('auto_updater').autoUpdater;
autoUpdater.__proto__ = EventEmitter.prototype;
-var AutoUpdater, EventEmitter, app, squirrelUpdate, url,
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- hasProp = {}.hasOwnProperty;
+const app = require('electron').app;
+const EventEmitter = require('events').EventEmitter;
+const url = require('url');
+const squirrelUpdate = require('./squirrel-update-win');
-app = require('electron').app;
+var extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+hasProp = {}.hasOwnProperty;
-EventEmitter = require('events').EventEmitter;
-
-url = require('url');
-
-squirrelUpdate = require('./squirrel-update-win');
-
-AutoUpdater = (function(superClass) {
+var AutoUpdater = (function(superClass) {
extend(AutoUpdater, superClass);
function AutoUpdater() {
-var appFolder, exeName, fs, path, spawn, spawnUpdate, updateExe;
-
-fs = require('fs');
-
-path = require('path');
-
-spawn = require('child_process').spawn;
+const fs = require('fs');
+const path = require('path');
+const spawn = require('child_process').spawn;
// i.e. my-app/app-0.1.13/
-appFolder = path.dirname(process.execPath);
+const appFolder = path.dirname(process.execPath);
// i.e. my-app/Update.exe
-updateExe = path.resolve(appFolder, '..', 'Update.exe');
+const updateExe = path.resolve(appFolder, '..', 'Update.exe');
-exeName = path.basename(process.execPath);
+const exeName = path.basename(process.execPath);
// Spawn a command and invoke the callback when it completes with an error
// and the output from standard out.
-spawnUpdate = function(args, detached, callback) {
+var spawnUpdate = function(args, detached, callback) {
var error, error1, errorEmitted, spawnedProcess, stderr, stdout;
try {
spawnedProcess = spawn(updateExe, args, {
-var BrowserWindow, EventEmitter, deprecate, ipcMain, ref;
-
-ref = require('electron'), ipcMain = ref.ipcMain, deprecate = ref.deprecate;
-
-EventEmitter = require('events').EventEmitter;
-
-BrowserWindow = process.atomBinding('window').BrowserWindow;
+const ipcMain = require('electron').ipcMain;
+const deprecate = require('electron').deprecate;
+const EventEmitter = require('events').EventEmitter;
+const BrowserWindow = process.atomBinding('window').BrowserWindow;
BrowserWindow.prototype.__proto__ = EventEmitter.prototype;
-var BrowserWindow, api, app, binding, checkAppInitialized, fileDialogProperties, j, len, messageBoxOptions, messageBoxTypes, parseArgs, ref, ref1, v8Util,
- slice = [].slice,
- indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+const app = require('electron').app;
+const BrowserWindow = require('electron').BrowserWindow;
+const binding = process.atomBinding('dialog');
+const v8Util = process.atomBinding('v8_util');
-ref = require('electron'), app = ref.app, BrowserWindow = ref.BrowserWindow;
+var slice = [].slice;
+var indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
-binding = process.atomBinding('dialog');
-
-v8Util = process.atomBinding('v8_util');
-
-fileDialogProperties = {
+var fileDialogProperties = {
openFile: 1 << 0,
openDirectory: 1 << 1,
multiSelections: 1 << 2,
createDirectory: 1 << 3
};
-messageBoxTypes = ['none', 'info', 'warning', 'error', 'question'];
+var messageBoxTypes = ['none', 'info', 'warning', 'error', 'question'];
-messageBoxOptions = {
+var messageBoxOptions = {
noLink: 1 << 0
};
-parseArgs = function(window, options, callback) {
+var parseArgs = function(window, options, callback) {
if (!(window === null || (window != null ? window.constructor : void 0) === BrowserWindow)) {
// Shift.
callback = options;
return [window, options, callback];
};
-checkAppInitialized = function() {
+var checkAppInitialized = function() {
if (!app.isReady()) {
throw new Error('dialog module can only be used after app is ready');
}
};
// Mark standard asynchronous functions.
-ref1 = ['showMessageBox', 'showOpenDialog', 'showSaveDialog'];
+var ref1 = ['showMessageBox', 'showOpenDialog', 'showSaveDialog'];
+var j, len
for (j = 0, len = ref1.length; j < len; j++) {
- api = ref1[j];
+ var api = ref1[j];
v8Util.setHiddenValue(module.exports[api], 'asynchronous', true);
}
-var common;
-
-common = require('../../../../common/api/lib/exports/electron');
+const common = require('../../../../common/api/lib/exports/electron');
// Import common modules.
-var EventEmitter;
-
-EventEmitter = require('events').EventEmitter;
+const EventEmitter = require('events').EventEmitter;
module.exports = new EventEmitter;
-var deprecate, ipcMain, ref;
-
-ref = require('electron'), deprecate = ref.deprecate, ipcMain = ref.ipcMain;
+const deprecate = require('electron').deprecate;
+const ipcMain = require('electron').ipcMain;
// This module is deprecated, we mirror everything from ipcMain.
deprecate.warn('ipc module', 'require("electron").ipcMain');