Skip to content

Commit

Permalink
Use version checker to check for updates
Browse files Browse the repository at this point in the history
  • Loading branch information
chinleung committed Jun 21, 2019
1 parent 840fc2b commit 59fd2f5
Show file tree
Hide file tree
Showing 3 changed files with 368 additions and 2 deletions.
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { Notification } = require('electron');
const versionChecker = require('sw-exporter-plugin-version-checker');

module.exports = {
defaultConfig: {
Expand All @@ -23,6 +24,14 @@ module.exports = {
init (proxy, config) {
const pluginConfig = config.Config.Plugins[this.pluginName];

if (pluginConfig.enabled) {
versionChecker.proceed({
name: this.pluginName,
config: require('./package.json'),
proxy: proxy
});
}

Object.entries(this.events())
.forEach(([mode, event]) => {
proxy.on(event, (request, response) => {
Expand Down
353 changes: 353 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
"version": "1.0.2",
"description": "A run notification plugin for SWEX.",
"keywords": [
"SWEX", "Summoners War", "Run Notifier"
"SWEX",
"Summoners War",
"Run Notifier"
],
"main": "index.js",
"dependencies": {},
"dependencies": {
"sw-exporter-plugin-version-checker": "github:chinleung/sw-exporter-plugin-version-checker"
},
"devDependencies": {},
"author": {
"name": "Chin Leung",
Expand Down

0 comments on commit 59fd2f5

Please sign in to comment.