build(docs-infra): do not include license comment in first API doc (#26050)
The default dgeni config is to concatenate leading comments in front of API items. In the case that you have an API item that starts a file with no import statements, the license comment at the top of the file was being added to the front of the API item's comment. SInce the license comment includes the `@license` tag and the API item's comment did not start with `@description` the content of the API item's comment was being put inside the `@license` tag, and no description was being extracted from the API item's comment. This commit updates to a version of dgeni-packages that has a switch to turn off this concatenation, and then also configures this switch. Closes #26045 PR Close #26050
This commit is contained in:

committed by
Kara Erickson

parent
48094835bf
commit
9931bd7576
@ -126,10 +126,12 @@ module.exports = new Package('angular-api', [basePackage, typeScriptPackage])
|
||||
})
|
||||
|
||||
// Configure jsdoc-style tag parsing
|
||||
.config(function(parseTagsProcessor, getInjectables) {
|
||||
.config(function(parseTagsProcessor, getInjectables, tsHost) {
|
||||
// Load up all the tag definitions in the tag-defs folder
|
||||
parseTagsProcessor.tagDefinitions =
|
||||
parseTagsProcessor.tagDefinitions.concat(getInjectables(requireFolder(__dirname, './tag-defs')));
|
||||
// We don't want license headers to be joined to the first API item's comment
|
||||
tsHost.concatMultipleLeadingComments = false;
|
||||
})
|
||||
|
||||
.config(function(computeStability, splitDescription, addNotYetDocumentedProperty, API_DOC_TYPES_TO_RENDER, API_DOC_TYPES) {
|
||||
|
Reference in New Issue
Block a user