Skip to content

Commit

Permalink
Bump electron to v10 (+ remove devtron, bump spectron)
Browse files Browse the repository at this point in the history
  • Loading branch information
th-ch committed Oct 4, 2020
1 parent 97dce5a commit 5f0dcbb
Show file tree
Hide file tree
Showing 4 changed files with 562 additions and 661 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ function createMainWindow() {
nodeIntegration: isTesting(), // Only necessary when testing with Spectron
preload: path.join(__dirname, "preload.js"),
nativeWindowOpen: true, // window.open return Window object(like in regular browsers), not BrowserWindowProxy
enableRemoteModule: true,
affinity: "main-window", // main window, and addition windows should work in one process
},
frame: !is.macOS(),
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,14 @@
"node-fetch": "^2.6.1"
},
"devDependencies": {
"devtron": "^1.4.0",
"electron": "^8.2.4",
"electron": "^10.1.3",
"electron-builder": "^22.8.1",
"electron-devtools-installer": "^3.1.1",
"electron-icon-maker": "0.0.5",
"get-port": "^5.1.1",
"jest": "^26.4.2",
"rimraf": "^3.0.2",
"spectron": "^10.0.1",
"spectron": "^12.0.0",
"xo": "^0.33.1"
},
"xo": {
Expand Down
4 changes: 2 additions & 2 deletions preload.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const path = require("path");

const { getCurrentWindow } = require("electron").remote;
const { remote } = require("electron");

const { getEnabledPlugins, store } = require("./store");
const { fileExists } = require("./plugins/utils");
Expand Down Expand Up @@ -28,5 +28,5 @@ document.addEventListener("DOMContentLoaded", () => {

// Add action for reloading
global.reload = () =>
getCurrentWindow().webContents.loadURL(store.get("url"));
remote.getCurrentWindow().webContents.loadURL(store.get("url"));
});
Loading

0 comments on commit 5f0dcbb

Please sign in to comment.