angular-cn/aio/tools/transforms/angular-api-package/processors
Pete Bacon Darwin a4f3f3f81d build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673)
Now, one can add an `@alias` tag to API docs, which tells dgeni that this
API element (usually a `const`) is really just an alias for some API element
defined elsewhere.

Dgeni will then look up this API element and copy over the properties from
the alias to the current doc.

For example, we would like to privately export an Enum from `@angular/core`
but then publicly export this from `@angular/common`:

**packages/core/private_exports.ts**

```ts
/**
 * Description of this document.
 */
export enum ɵSomeEnum { ... }
```

**packages/common/public_api.ts**

```ts
import {ɵSomeEnum} from '@angular/core';

 /**
 * @alias core/ɵSomeEnum
 */
export const SomeEnum = ɵSomeEnum;
```

In the generated docs there will be a page for `common/SomeEnum`, which
will be rendered as an enum, rather than a const, showing the description
extracted from the `core/ɵSomeEnum`.

---

The implementation of this feature required some refactoring of the other
processing:

1. Previously `ɵ` prefixed exports were not even considered.
2. Due to 1. some processors needed to have guards added to ignore such
   private exports (`addMetadataAliases` and `checkContentRules`).
3. The processing of package pages had to be reworked (and split) so that
   it picked up the aliased export docs after their alias proeprties had
   been copied.

See FW-1207, FW-632, #29249

PR Close #29673
2019-04-04 10:52:36 -07:00
..
addMetadataAliases.js build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
addMetadataAliases.spec.js build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
addNotYetDocumentedProperty.js build(aio): fix `addNotYetDocumentedProperty` processor (#22770) 2018-03-15 11:37:31 -07:00
addNotYetDocumentedProperty.spec.js build(aio): fix `addNotYetDocumentedProperty` processor (#22770) 2018-03-15 11:37:31 -07:00
collectPackageContentDocs.js build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
collectPackageContentDocs.spec.js build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
computeApiBreadCrumbs.js build(docs-infra): include packages in API template breadcrumbs (#25453) 2018-08-14 13:17:15 -07:00
computeApiBreadCrumbs.spec.js fixup! docs: update Universal guide (#28296) 2019-03-11 10:52:18 -07:00
computeSearchTitle.js build(docs-infra): implement the 'package' API template (#24631) 2018-07-13 19:45:54 -04:00
computeSearchTitle.spec.js build(docs-infra): implement the 'package' API template (#24631) 2018-07-13 19:45:54 -04:00
computeStability.js build(aio): compute stability and deprecate `@stable` tag (#22674) 2018-03-13 19:55:00 -07:00
computeStability.spec.js build(aio): compute stability and deprecate `@stable` tag (#22674) 2018-03-13 19:55:00 -07:00
convertPrivateClassesToInterfaces.js build(aio): refactor dgeni packages 2017-04-23 22:50:33 +01:00
extractDecoratedClasses.js build(docs-infra): separate NgModules from Classes in API docs (#25734) 2018-09-19 16:18:24 -07:00
extractDecoratedClasses.spec.js build(aio): refactor dgeni packages 2017-04-23 22:50:33 +01:00
extractPipeParams.js build(aio): improve the API Pipe pages (#22702) 2018-03-14 14:21:11 -07:00
extractPipeParams.spec.js build(aio): improve the API Pipe pages (#22702) 2018-03-14 14:21:11 -07:00
filterContainedDocs.js build(aio): rearrange processors to ensure we catch all content errors (#24000) 2018-06-13 16:47:40 -07:00
filterPrivateDocs.js build(aio): rearrange processors to ensure we catch all content errors (#24000) 2018-06-13 16:47:40 -07:00
filterPrivateDocs.spec.js build(aio): rearrange processors to ensure we catch all content errors (#24000) 2018-06-13 16:47:40 -07:00
fixupRealProjectRelativePath.js build(docs-infra): display github links in CLI API docs (#26515) 2018-10-19 11:12:54 -07:00
fixupRealProjectRelativePath.spec.js build(docs-infra): display github links in CLI API docs (#26515) 2018-10-19 11:12:54 -07:00
generateApiListDoc.js build(docs-infra): implement the 'package' API template (#24631) 2018-07-13 19:45:54 -04:00
generateApiListDoc.spec.js docs: migrate examples from @angular/http to @angular/common/http (#28296) 2019-03-11 10:52:17 -07:00
markBarredODocsAsPrivate.js build(aio): refactor dgeni packages 2017-04-23 22:50:33 +01:00
markBarredODocsAsPrivate.spec.js build(aio): fix test description 2017-07-11 11:44:05 +01:00
matchUpDirectiveDecorators.js build(docs-infra): directive inputs and outputs (#25768) 2018-10-01 09:36:33 -07:00
matchUpDirectiveDecorators.spec.js build(docs-infra): directive inputs and outputs (#25768) 2018-10-01 09:36:33 -07:00
mergeDecoratorDocs.js build(docs-infra): remove legacy jsdoc tag processing (#26039) 2018-09-24 09:11:02 -07:00
mergeDecoratorDocs.spec.js build(aio): ensure the correct decorator properties are merged (#24289) 2018-06-06 10:23:47 -07:00
processAliasDocs.js build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
processAliasDocs.spec.js build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
processClassLikeMembers.js feat(aio): first pass API docs redesign (#21874) 2018-02-09 13:05:16 -08:00
processClassLikeMembers.spec.js style: typos fixed - https://github.com/vlajos/misspell-fixer (#22975) 2018-03-27 14:51:53 -04:00
processNgModuleDocs.js build(docs-infra): sort NgModule exports by id (#26051) 2018-09-21 17:00:03 -07:00
processNgModuleDocs.spec.js build(docs-infra): sort NgModule exports by id (#26051) 2018-09-21 17:00:03 -07:00
processPackages.js build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
processPackages.spec.js build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
removeInjectableConstructors.js build(docs-infra): support hiding constructors of injectable classes (#24529) 2018-06-26 10:58:11 -07:00
removeInjectableConstructors.spec.js build(docs-infra): support hiding constructors of injectable classes (#24529) 2018-06-26 10:58:11 -07:00
simplifyMemberAnchors.js build(aio): improve accuracy of code auto-linking (#22494) 2018-03-01 08:11:19 -08:00
simplifyMemberAnchors.spec.js build(aio): improve accuracy of code auto-linking (#22494) 2018-03-01 08:11:19 -08:00
splitDescription.js build(docs-infra): remove legacy jsdoc tag processing (#26039) 2018-09-24 09:11:02 -07:00
splitDescription.spec.js build(docs-infra): remove legacy jsdoc tag processing (#26039) 2018-09-24 09:11:02 -07:00