Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

update notifications for electron app #695

Merged
merged 1 commit into from
May 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/react-devtools/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
var app = require('electron').app; // Module to control application life.
var BrowserWindow = require('electron').BrowserWindow; // Module to create native browser window.
var path = require('path');
var updateNotifier = require('update-notifier');
var pkg = require('./package.json');

var mainWindow = null;

Expand All @@ -19,6 +21,9 @@ app.on('window-all-closed', function() {
});

app.on('ready', function() {
// notify if there's an update
updateNotifier({pkg}).notify({defer: false});

// Create the browser window.
mainWindow = new BrowserWindow({width: 800, height: 600, icon: path.join(__dirname, 'icons/icon128.png')});

Expand Down
3 changes: 2 additions & 1 deletion packages/react-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"cross-spawn": "^5.0.1",
"electron": "^1.4.15",
"ip": "^1.1.4",
"react-devtools-core": "^2.1.7"
"react-devtools-core": "^2.1.7",
"update-notifier": "^2.1.0"
}
}