Skip to content

Commit daee768

Browse files
authored
Merge pull request #6 from neogeek/feature/update-notifier
Added update-notifier package.
2 parents a562143 + da961ee commit daee768

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

bin/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
const os = require('os');
44

5+
const updateNotifier = require('update-notifier');
6+
7+
const pkg = require('../package.json');
8+
59
const getUnityUrls = require('../lib/get-unity-urls');
610

711
const osKeyMap = {
@@ -13,5 +17,7 @@ const PROCESS_CMD_LINE_ARGS_LENGTH = 2;
1317

1418
const requestedVersion = process.argv.slice(PROCESS_CMD_LINE_ARGS_LENGTH).pop();
1519

20+
updateNotifier({pkg}).notify();
21+
1622
getUnityUrls(requestedVersion).then(urls =>
1723
process.stdout.write(`${urls[osKeyMap[os.type()]]}`));

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"node": ">=12.0"
1111
},
1212
"license": "MIT",
13+
"dependencies": {
14+
"update-notifier": "3.0.1"
15+
},
1316
"devDependencies": {
1417
"@neogeek/eslint-config-standards": "github:neogeek/eslint-config-standards",
1518
"babel-eslint": "10.0.3",

0 commit comments

Comments
 (0)