-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
38 lines (30 loc) · 958 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env node
import {
CommandLineFlagParameter,
CommandLineParser,
} from '@rushstack/ts-command-line';
import { CoordAction } from './actions';
export class TrucliCommandLine extends CommandLineParser {
private _verbose!: CommandLineFlagParameter;
constructor() {
super({
toolFilename: 'ftrucli',
toolDescription:
'Food Truck CLI used to find food trucks near a geospatial coordinate (especially in San Francisco).',
});
this.addAction(new CoordAction());
}
protected onDefineParameters(): void {
this._verbose = this.defineFlagParameter({
parameterLongName: '--verbose',
parameterShortName: '-v',
description: 'Print out all the debug!',
});
}
protected onExecture(): Promise<void> {
return super.onExecute();
}
}
const cmdLine: TrucliCommandLine = new TrucliCommandLine();
// eslint-disable-next-line @typescript-eslint/no-floating-promises
cmdLine.execute();