diff --git a/cli/index.js b/cli/index.js index 2cecddc9..5363abf5 100644 --- a/cli/index.js +++ b/cli/index.js @@ -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([''], 'Launch Hyper'); args.option(['v', 'verbose'], 'Verbose mode', false);