Skip to content

Commit

Permalink
Grab version used for CLI from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
LexLuengas committed Oct 28, 2022
1 parent 35ed699 commit 9d3f851
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import * as chokidar from 'chokidar';
import * as program from 'commander';
import * as http from 'http';
import * as path from 'path';
const npmPackage = require('../../package.json');

import { runProxy } from './app';

Expand Down Expand Up @@ -36,7 +37,7 @@ program //
'watch for changes in a file or directory (falls back to the OpenAPI file) and restart server accordingly',
)
.option('-v, --verbose', 'show verbose output')
.version('1.0.0')
.version(npmPackage.version ?? '?')
.parse(process.argv);

let server: http.Server;
Expand Down

0 comments on commit 9d3f851

Please sign in to comment.