mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
[CLI] added 'version' command. (#3207)
This commit is contained in:
parent
d634fc3aff
commit
20165e137d
1 changed files with 6 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
const {spawn, exec} = require('child_process');
|
||||
const {isAbsolute, resolve} = require('path');
|
||||
const {existsSync} = require('fs');
|
||||
const {version} = require('../app/package');
|
||||
const pify = require('pify');
|
||||
const args = require('args');
|
||||
const chalk = require('chalk');
|
||||
|
|
@ -133,6 +134,11 @@ args.command(['d', 'docs', 'h', 'home'], 'Open the npm page of a plugin', (name,
|
|||
process.exit(0);
|
||||
});
|
||||
|
||||
args.command(['version'], 'Show the version of hyper', () => {
|
||||
console.log(version);
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
args.command(['<default>'], 'Launch Hyper');
|
||||
|
||||
args.option(['v', 'verbose'], 'Verbose mode', false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue