@vaibhavjha/qrfy 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/qrfy.js +12 -1
  2. package/package.json +1 -1
package/bin/qrfy.js CHANGED
@@ -4,11 +4,18 @@ const { getLocalIP } = require("../lib/network");
4
4
  const { displayQR } = require("../lib/qr");
5
5
  const { runServer } = require("../lib/runner");
6
6
 
7
+ const { version } = require("../package.json");
8
+
7
9
  const args = process.argv.slice(2);
8
10
 
11
+ if (args[0] === "--version" || args[0] === "-v" || args[0] === "-V") {
12
+ console.log(`qrfy v${version}`);
13
+ process.exit(0);
14
+ }
15
+
9
16
  if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
10
17
  console.log("");
11
- console.log(" \x1b[1mqrfy\x1b[0m - Scan your dev server instantly");
18
+ console.log(` \x1b[1mqrfy\x1b[0m v${version} - Scan your dev server instantly`);
12
19
  console.log("");
13
20
  console.log(" \x1b[1mUsage:\x1b[0m");
14
21
  console.log(" qrfy <command> [args...]");
@@ -18,6 +25,10 @@ if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
18
25
  console.log(" qrfy vite");
19
26
  console.log(" qrfy npm run dev");
20
27
  console.log("");
28
+ console.log(" \x1b[1mOptions:\x1b[0m");
29
+ console.log(" -h, --help Show this help message");
30
+ console.log(" -v, --version Show version number");
31
+ console.log("");
21
32
  process.exit(0);
22
33
  }
23
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaibhavjha/qrfy",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Scan your dev server instantly - QR code for local dev URLs",
5
5
  "author": "Vaibhav Jha (https://github.com/vaibhavjha-dev)",
6
6
  "repository": {