From 64069e9d60008007a801f127280430538b23b553 Mon Sep 17 00:00:00 2001 From: Jason Healy Date: Thu, 23 Apr 2020 12:02:52 +0100 Subject: [PATCH] feat: Add version cmd to cli --- packages/daf-cli/src/cli.ts | 1 + packages/daf-cli/src/version.ts | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 packages/daf-cli/src/version.ts diff --git a/packages/daf-cli/src/cli.ts b/packages/daf-cli/src/cli.ts index e83c0ccf0..c292dd733 100644 --- a/packages/daf-cli/src/cli.ts +++ b/packages/daf-cli/src/cli.ts @@ -7,6 +7,7 @@ import './data-explorer' import './graphql' import './sdr' import './msg' +import './version' if (!process.argv.slice(2).length) { program.outputHelp() diff --git a/packages/daf-cli/src/version.ts b/packages/daf-cli/src/version.ts new file mode 100644 index 000000000..3f0681b82 --- /dev/null +++ b/packages/daf-cli/src/version.ts @@ -0,0 +1,5 @@ +import program from 'commander' + +const { version } = require('../package.json') + +program.version(version, '-v, --version', 'output the current version')