@@ -11,8 +11,8 @@ import { logging, tags } from '@angular-devkit/core';
11
11
import { ProcessOutput } from '@angular-devkit/core/node' ;
12
12
import * as ansiColors from 'ansi-colors' ;
13
13
import { appendFileSync , writeFileSync } from 'fs' ;
14
- import minimist from 'minimist' ;
15
14
import { filter , map , toArray } from 'rxjs/operators' ;
15
+ import yargsParser from 'yargs-parser' ;
16
16
import { Command } from '../src/command' ;
17
17
import { defaultReporter } from '../src/default-reporter' ;
18
18
import { defaultStatsCapture } from '../src/default-stats-capture' ;
@@ -25,6 +25,7 @@ export interface MainOptions {
25
25
stderr ? : ProcessOutput ;
26
26
}
27
27
28
+ // eslint-disable-next-line max-lines-per-function
28
29
export async function main ( {
29
30
args,
30
31
stdout = process . stdout ,
@@ -69,13 +70,22 @@ export async function main({
69
70
'watch-timeout' : number ;
70
71
'watch-matcher' ? : string ;
71
72
'watch-script' ? : string ;
72
- '--' : string [ ] | null ;
73
+ '--' : string [ ] ;
74
+ _: string [ ] ;
75
+ $0: string ;
73
76
}
74
77
75
78
// Parse the command line.
76
- const argv = minimist ( args , {
79
+ const argv = yargsParser ( args , {
77
80
boolean : [ 'help' , 'verbose' , 'overwrite-output-file' ] ,
78
81
string : [ 'watch-matcher' , 'watch-script' ] ,
82
+ configuration : {
83
+ 'dot-notation' : false ,
84
+ 'boolean-negation' : true ,
85
+ 'strip-aliased' : true ,
86
+ 'populate--' : true ,
87
+ 'camel-case-expansion' : false ,
88
+ } ,
79
89
default : {
80
90
'exit-code' : 0 ,
81
91
'iterations' : 5 ,
@@ -85,8 +95,7 @@ export async function main({
85
95
'prefix' : '[benchmark]' ,
86
96
'watch-timeout' : 10000 ,
87
97
} ,
88
- '--' : true ,
89
- } ) as { } as BenchmarkCliArgv ;
98
+ } ) as BenchmarkCliArgv ;
90
99
91
100
// Create the DevKit Logger used through the CLI.
92
101
const logger = new logging . TransformLogger ( 'benchmark-prefix-logger' , ( stream ) =>
0 commit comments