mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 05:38:41 -09:00
[CLI] added 'version' command. (#3207)
This commit is contained in:
parent
a6229a5eef
commit
09fee126b0
1 changed files with 6 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
const {spawn, exec} = require('child_process');
|
const {spawn, exec} = require('child_process');
|
||||||
const {isAbsolute, resolve} = require('path');
|
const {isAbsolute, resolve} = require('path');
|
||||||
const {existsSync} = require('fs');
|
const {existsSync} = require('fs');
|
||||||
|
const {version} = require('../app/package');
|
||||||
const pify = require('pify');
|
const pify = require('pify');
|
||||||
const args = require('args');
|
const args = require('args');
|
||||||
const chalk = require('chalk');
|
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);
|
process.exit(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
args.command(['version'], 'Show the version of hyper', () => {
|
||||||
|
console.log(version);
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
|
|
||||||
args.command(['<default>'], 'Launch Hyper');
|
args.command(['<default>'], 'Launch Hyper');
|
||||||
|
|
||||||
args.option(['v', 'verbose'], 'Verbose mode', false);
|
args.option(['v', 'verbose'], 'Verbose mode', false);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue