Clobber generic/default options with more specific options #587
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes an issue where
typedoc
clobbers the CLI path with the found options fromtsconfig.json
ortypedoc.js
. It took me a bit to figure everything out:ArgumentsReader
has no priority, whereas the priorities forTypedocReader
andTSConfigReader
are both-100
.onApi
sorts from biggest to smallest. To verify,ArgumentsReader
has the largest priority, it executes first. If it encounters an unknown argument, itpush
es the filename toevent.inputFiles
.TSConfigReader
has a lower priority, it executes second. It searches thetsconfig.json
for filenames. To do so, it usesparseJsonConfigFileContent
, which checks for file specs. If it doesn't find any, it returns files matching**/*
that do not match common package folders. In essence, it will always return non-emptyfileNames
. Even werefileNames
empty,event.inputFiles
is still clobbered.src/test/renderer/specs/index.html
. UnlessArgumentsReader
's priority is lowered (or a different solution is used), there's absolutely no way to pass in the source directory/files via the command line.I've been trying to figure this out for too many hours, so I don't have a demo prepped. I can make one later. This folder structure
used with this command
will always generate documentation for both
some-other-file
ANDsome-file
.