Skip to content

Commit

Permalink
Merge pull request #6 from neogeek/feature/update-notifier
Browse files Browse the repository at this point in the history
Added update-notifier package.
  • Loading branch information
neogeek authored Oct 30, 2019
2 parents a562143 + da961ee commit daee768
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

const os = require('os');

const updateNotifier = require('update-notifier');

const pkg = require('../package.json');

const getUnityUrls = require('../lib/get-unity-urls');

const osKeyMap = {
Expand All @@ -13,5 +17,7 @@ const PROCESS_CMD_LINE_ARGS_LENGTH = 2;

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

updateNotifier({pkg}).notify();

getUnityUrls(requestedVersion).then(urls =>
process.stdout.write(`${urls[osKeyMap[os.type()]]}`));
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"node": ">=12.0"
},
"license": "MIT",
"dependencies": {
"update-notifier": "3.0.1"
},
"devDependencies": {
"@neogeek/eslint-config-standards": "github:neogeek/eslint-config-standards",
"babel-eslint": "10.0.3",
Expand Down

0 comments on commit daee768

Please sign in to comment.