Skip to content

Commit be681f5

Browse files
committed
fix: deprecation lib and api
1 parent fb4bd17 commit be681f5

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ npm-debug.log.*
1212
thumbs.db
1313
yarn*.log
1414
!.gitkeep
15-
*-lock.json
1615
*.log
1716
dist_electron/

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@
3636
"@vue/test-utils": "1.0.0-beta.29",
3737
"babel-eslint": "10.1.0",
3838
"electron": "10.1.3",
39+
"electron-devtools-installer": "^3.1.1",
3940
"eslint": "6.6.0",
4041
"eslint-plugin-prettier": "3.1.1",
4142
"eslint-plugin-vue": "6.0.0",
4243
"prettier": "1.19.1",
43-
"vue-cli-plugin-electron-builder": "2.0.0-beta.4",
44+
"vue-cli-plugin-electron-builder": "2.0.0-rc.4",
4445
"vue-template-compiler": "2.6.11"
4546
}
4647
}

src/background.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import { app, protocol, BrowserWindow, Menu } from 'electron'
1+
import { app, protocol, BrowserWindow, Menu, shell } from "electron";
22
import { menu } from './main/menu'
33
import {
44
createProtocol,
5-
installVueDevtools,
65
} from 'vue-cli-plugin-electron-builder/lib'
6+
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
77
import { registerUpdaterTask } from './main/updater'
8+
import electron_context_menu from "electron-context-menu";
89
const isDevelopment = process.env.NODE_ENV !== 'production'
910

1011
require('electron-context-menu')({})
@@ -28,6 +29,7 @@ function createWindow() {
2829
width: 800,
2930
height: 600,
3031
webPreferences: {
32+
enableRemoteModule: true,
3133
nodeIntegration: true,
3234
webviewTag: true,
3335
},
@@ -79,7 +81,7 @@ app.on('ready', async () => {
7981
// If you are not using Windows 10 dark mode, you may uncomment these lines
8082
// In addition, if the linked issue is closed, you can upgrade electron and uncomment these lines
8183
try {
82-
await installVueDevtools()
84+
await installExtension(VUEJS_DEVTOOLS)
8385
} catch (e) {
8486
console.error('Vue Devtools failed to install:', e.toString())
8587
}

0 commit comments

Comments
 (0)