-
Notifications
You must be signed in to change notification settings - Fork 26.9k
feat(docs-infra):Extracts aliases from doc entries #65936
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
base: main
Are you sure you want to change the base?
Conversation
29308d5 to
2b08496
Compare
2b08496 to
c22af99
Compare
|
I think instead of relying on some extra jsdoc tags, we can be a bit smarter and extract them from the selector directly eg:
|
c22af99 to
46e54a0
Compare
| * @param selector The CSS selector string from directive/component metadata | ||
| * @returns Array of attribute names that can be used as aliases | ||
| */ | ||
| function extractAliasesFromSelector(selector: string): string[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add some test coverage for this.
The extractor tests are located at packages/compiler-cli/test/ngtsc/doc_extraction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
Deployed adev-preview for 46e54a0 to: https://ng-dev-previews-fw--pr-angular-angular-65936-adev-prev-bpbj4xc1.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
Implements a mechanism to extract alias names from a directive/component's selector.
46e54a0 to
4d9ea6b
Compare
Implements a mechanism to extract alias names from a directive/component's selector.
The implementation started in #65571 is now complete, enabling the addition of aliases for Angular Aria and allowing automatic generation of links for entries such as
ngToolbar.Then the output of entries should look something like this:
{ "...", "entries": [ { "...", "aliases": ["ngToolbar"] } ] }