Skip to content

Commit

Permalink
Add -v --version to output the version number (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
charpeni authored Aug 13, 2019
1 parent 06e3b8a commit cb8951c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@

const inquirer = require('inquirer');
const chalk = require('chalk');
const program = require('commander');

const getDevices = require('./getAppsByDevice');
const { version } = require('./package.json');

program
.version(version, '-v, --version', 'output the version number')
.parse(process.argv);

function activeDevicesOnlyFilter(device) {
return device.state === 3;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"license": "MIT",
"dependencies": {
"chalk": "^2.4.2",
"commander": "^3.0.0",
"inquirer": "^6.2.2",
"simple-plist": "^1.0.0"
},
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,11 @@ commander@^2.11.0, commander@^2.20.0, commander@~2.20.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==

commander@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.0.tgz#0641ea00838c7a964627f04cddc336a2deddd60a"
integrity sha512-pl3QrGOBa9RZaslQiqnnKX2J068wcQw7j9AIaBQ9/JEp5RY6je4jKTImg0Bd+rpoONSe7GUFSgkxLeo17m3Pow==

component-emitter@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6"
Expand Down

0 comments on commit cb8951c

Please sign in to comment.