Skip to content
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
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