Skip to content

Commit 482821c

Browse files
thecjharriesblakeembrey
authored andcommitted
Improve argument order specificity (#587)
1 parent e377524 commit 482821c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/lib/utils/options/readers/arguments.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { ParameterType } from '../declaration';
88
@Component({name: 'options:arguments'})
99
export class ArgumentsReader extends OptionsComponent {
1010
initialize() {
11-
this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover);
11+
this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover, -200);
1212
}
1313

1414
onDiscover(event: DiscoverEvent) {
@@ -46,6 +46,7 @@ export class ArgumentsReader extends OptionsComponent {
4646
}
4747
}
4848

49+
const files = [];
4950
while (index < args.length) {
5051
const arg = args[index++];
5152

@@ -54,9 +55,12 @@ export class ArgumentsReader extends OptionsComponent {
5455
} else if (arg.charCodeAt(0) === _ts.CharacterCodes.minus) {
5556
readArgument(arg.slice(arg.charCodeAt(1) === _ts.CharacterCodes.minus ? 2 : 1).toLowerCase());
5657
} else {
57-
event.addInputFile(arg);
58+
files.push(arg);
5859
}
5960
}
61+
if (files) {
62+
event.inputFiles = files;
63+
}
6064
}
6165

6266
/**

src/lib/utils/options/readers/typedoc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class TypedocReader extends OptionsComponent {
2222
private static OPTIONS_KEY = 'options';
2323

2424
initialize() {
25-
this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover, -100);
25+
this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover, -150);
2626
}
2727

2828
onDiscover(event: DiscoverEvent) {

0 commit comments

Comments
 (0)