@@ -11,8 +11,8 @@ import { logging, tags } from '@angular-devkit/core';
1111import { ProcessOutput } from '@angular-devkit/core/node' ;
1212import * as ansiColors from 'ansi-colors' ;
1313import { appendFileSync , writeFileSync } from 'fs' ;
14- import minimist from 'minimist' ;
1514import { filter , map , toArray } from 'rxjs/operators' ;
15+ import yargsParser from 'yargs-parser' ;
1616import { Command } from '../src/command' ;
1717import { defaultReporter } from '../src/default-reporter' ;
1818import { defaultStatsCapture } from '../src/default-stats-capture' ;
@@ -25,6 +25,7 @@ export interface MainOptions {
2525 stderr ? : ProcessOutput ;
2626}
2727
28+ // eslint-disable-next-line max-lines-per-function
2829export async function main ( {
2930 args,
3031 stdout = process . stdout ,
@@ -69,13 +70,22 @@ export async function main({
6970 'watch-timeout' : number ;
7071 'watch-matcher' ? : string ;
7172 'watch-script' ? : string ;
72- '--' : string [ ] | null ;
73+ '--' : string [ ] ;
74+ _: string [ ] ;
75+ $0: string ;
7376 }
7477
7578 // Parse the command line.
76- const argv = minimist ( args , {
79+ const argv = yargsParser ( args , {
7780 boolean : [ 'help' , 'verbose' , 'overwrite-output-file' ] ,
7881 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+ } ,
7989 default : {
8090 'exit-code' : 0 ,
8191 'iterations' : 5 ,
@@ -85,8 +95,7 @@ export async function main({
8595 'prefix' : '[benchmark]' ,
8696 'watch-timeout' : 10000 ,
8797 } ,
88- '--' : true ,
89- } ) as { } as BenchmarkCliArgv ;
98+ } ) as BenchmarkCliArgv ;
9099
91100 // Create the DevKit Logger used through the CLI.
92101 const logger = new logging . TransformLogger ( 'benchmark-prefix-logger' , ( stream ) =>
0 commit comments