Use const
This commit is contained in:
parent
3a0fb42737
commit
1779701445
10 changed files with 92 additions and 130 deletions
|
@ -1,18 +1,11 @@
|
|||
var CrashReporter, binding, crashRepoter, electron, fs, os, path, spawn;
|
||||
const fs = require('fs');
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
const spawn = require('child_process').spawn;
|
||||
const electron = require('electron');
|
||||
const binding = process.atomBinding('crash_reporter');
|
||||
|
||||
fs = require('fs');
|
||||
|
||||
os = require('os');
|
||||
|
||||
path = require('path');
|
||||
|
||||
spawn = require('child_process').spawn;
|
||||
|
||||
electron = require('electron');
|
||||
|
||||
binding = process.atomBinding('crash_reporter');
|
||||
|
||||
CrashReporter = (function() {
|
||||
var CrashReporter = (function() {
|
||||
function CrashReporter() {}
|
||||
|
||||
CrashReporter.prototype.start = function(options) {
|
||||
|
@ -99,6 +92,4 @@ CrashReporter = (function() {
|
|||
|
||||
})();
|
||||
|
||||
crashRepoter = new CrashReporter;
|
||||
|
||||
module.exports = crashRepoter;
|
||||
module.exports = new CrashReporter;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// Do not expose the internal modules to `require`.
|
||||
exports.hideInternalModules = function() {
|
||||
var globalPaths;
|
||||
globalPaths = require('module').globalPaths;
|
||||
var globalPaths = require('module').globalPaths;
|
||||
if (globalPaths.length === 3) {
|
||||
|
||||
// Remove the "common/api/lib" and "browser-or-renderer/api/lib".
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
var deprecate, nativeImage;
|
||||
|
||||
deprecate = require('electron').deprecate;
|
||||
|
||||
nativeImage = process.atomBinding('native_image');
|
||||
const deprecate = require('electron').deprecate;
|
||||
const nativeImage = process.atomBinding('native_image');
|
||||
|
||||
// Deprecated.
|
||||
deprecate.rename(nativeImage, 'createFromDataUrl', 'createFromDataURL');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue