Skip to content
This repository was archived by the owner on Dec 5, 2022. It is now read-only.

Commit 71afb6d

Browse files
committed
electron: hopefully updates?
1 parent 8c03555 commit 71afb6d

File tree

3 files changed

+69
-34
lines changed

3 files changed

+69
-34
lines changed

package-lock.json

Lines changed: 51 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"build": {
1111
"appId": "com.electron.derivepass",
1212
"productName": "DerivePass",
13+
"mac": {
14+
"category": "public.app-category.productivity"
15+
},
1316
"publish": [
1417
"github"
1518
],
@@ -28,7 +31,8 @@
2831
"now-build": "npm run build && cp -rf dist/precache-manifest*.js dist/precache-manifest.common.js",
2932
"test:unit": "vue-cli-service test:unit",
3033
"electron": "electron .",
31-
"electron:build": "electron-builder"
34+
"electron:build": "npm run build && electron-builder",
35+
"electron:publish": "npm run electron:build -- -p always"
3236
},
3337
"devDependencies": {
3438
"bn.js": "^4.11.8",
@@ -84,5 +88,9 @@
8488
"> 1%",
8589
"last 2 versions",
8690
"not ie <= 8"
87-
]
91+
],
92+
"dependencies": {
93+
"electron-log": "^3.0.5",
94+
"electron-updater": "^4.0.6"
95+
}
8896
}

src/electron/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
const {
22
app, BrowserWindow, protocol, session, shell, ipcMain: ipc,
33
} = require('electron');
4+
const log = require('electron-log');
5+
const { autoUpdater } = require("electron-updater");
46

57
const { parse: parseURL } = require('url');
68
const { parse: parseQuery } = require('querystring');
@@ -14,6 +16,10 @@ const PRELOAD = path.join(__dirname, 'preload.js');
1416
let window = null;
1517
const iCloudQueue = [];
1618

19+
autoUpdater.logger = log;
20+
autoUpdater.logger.transports.file.level = 'info';
21+
log.info('App starting...');
22+
1723
function createWindow () {
1824
if (window) {
1925
return;
@@ -95,6 +101,8 @@ app.on('ready', () =>{
95101
});
96102

97103
createWindow();
104+
105+
autoUpdater.checkForUpdatesAndNotify();
98106
});
99107

100108
// Quit when all windows are closed.

0 commit comments

Comments
 (0)