add -v
This commit is contained in:
parent
5063e8c2ea
commit
3274ae140d
24
updates.js
24
updates.js
@ -7,24 +7,30 @@ if (args.includes("-h") || args.includes("--help")) {
|
||||
process.stdout.write(`usage: updates [options]
|
||||
|
||||
Options:
|
||||
--update, -u Also update package.json
|
||||
--json, -j Output JSON
|
||||
--color Force-enable color output
|
||||
--no-color Disable color output
|
||||
--help Print this help
|
||||
--update, -u Also update package.json
|
||||
--json, -j Output JSON
|
||||
--color Force-enable color output
|
||||
--no-color Disable color output
|
||||
--version, -v Print the version
|
||||
--help -h Print this help
|
||||
|
||||
Examples:
|
||||
$ updates
|
||||
$ updates -u
|
||||
$ updates -j
|
||||
\n`);
|
||||
$ updates -j\n`);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const os = require("os");
|
||||
const path = require("path");
|
||||
|
||||
if (args.includes("-v") || args.includes("--version")) {
|
||||
process.stdout.write(require(path.join(__dirname, "package.json")).version + os.EOL);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const fs = require("fs");
|
||||
const os = require("os");
|
||||
const got = require("got");
|
||||
const path = require("path");
|
||||
const semver = require("semver");
|
||||
const columnify = require("columnify");
|
||||
const chalk = require("chalk");
|
||||
|
Loading…
Reference in New Issue
Block a user