Skip to content

Commit de58233

Browse files
committed
Add --version flag
1 parent 869c0e3 commit de58233

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/ProjectIndexer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ import * as url from 'url'
33

44
import * as ts from 'typescript'
55

6+
import packageJson from '../package.json'
7+
68
import { FileIndexer } from './FileIndexer'
79
import { Input } from './Input'
810
import * as lsif from './lsif'
911
import { LsifSymbol } from './LsifSymbol'
1012
import { Options, lsiftyped } from './main'
1113
import { Packages } from './Packages'
12-
import packageJson from '../package.json'
1314

1415
export class ProjectIndexer {
1516
private options: Options

src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import * as path from 'path'
66
import * as ts from 'typescript'
77
import * as yargs from 'yargs'
88

9+
import packageJson from '../package.json'
10+
911
import * as lsif from './lsif'
1012
import { ProjectIndexer } from './ProjectIndexer'
1113

@@ -33,6 +35,7 @@ export function main(): void {
3335
yargs
3436
.scriptName('lsif-typescript')
3537
.usage('$0 <cmd> [args]')
38+
.version(packageJson.version)
3639
.command(
3740
'index [project]',
3841
'LSIF index a project',

0 commit comments

Comments
 (0)