Skip to content

Clobber generic/default options with more specific options #587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/lib/utils/options/readers/arguments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ParameterType } from '../declaration';
@Component({name: 'options:arguments'})
export class ArgumentsReader extends OptionsComponent {
initialize() {
this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover);
this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover, -200);
}

onDiscover(event: DiscoverEvent) {
Expand Down Expand Up @@ -46,6 +46,7 @@ export class ArgumentsReader extends OptionsComponent {
}
}

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

Expand All @@ -54,9 +55,12 @@ export class ArgumentsReader extends OptionsComponent {
} else if (arg.charCodeAt(0) === _ts.CharacterCodes.minus) {
readArgument(arg.slice(arg.charCodeAt(1) === _ts.CharacterCodes.minus ? 2 : 1).toLowerCase());
} else {
event.addInputFile(arg);
files.push(arg);
}
}
if (files) {
event.inputFiles = files;
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/options/readers/typedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class TypedocReader extends OptionsComponent {
private static OPTIONS_KEY = 'options';

initialize() {
this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover, -100);
this.listenTo(this.owner, DiscoverEvent.DISCOVER, this.onDiscover, -150);
}

onDiscover(event: DiscoverEvent) {
Expand Down