Skip to content

Commit 20165e1

Browse files
hayerchabou
authored andcommitted
[CLI] added 'version' command. (vercel#3207)
1 parent d634fc3 commit 20165e1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cli/index.js

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const {spawn, exec} = require('child_process');
44
const {isAbsolute, resolve} = require('path');
55
const {existsSync} = require('fs');
6+
const {version} = require('../app/package');
67
const pify = require('pify');
78
const args = require('args');
89
const chalk = require('chalk');
@@ -133,6 +134,11 @@ args.command(['d', 'docs', 'h', 'home'], 'Open the npm page of a plugin', (name,
133134
process.exit(0);
134135
});
135136

137+
args.command(['version'], 'Show the version of hyper', () => {
138+
console.log(version);
139+
process.exit(0);
140+
});
141+
136142
args.command(['<default>'], 'Launch Hyper');
137143

138144
args.option(['v', 'verbose'], 'Verbose mode', false);

0 commit comments

Comments
 (0)