angular-cn/aio/tools/transforms/angular-base-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
..
checkContentRules.js build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
checkContentRules.spec.js build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
checkUnbalancedBackTicks.js build(aio): refactor dgeni packages 2017-04-23 22:50:33 +01:00
checkUnbalancedBackTicks.spec.js build(aio): refactor dgeni packages 2017-04-23 22:50:33 +01:00
convertToJson.js build(aio): use the captured h1 as the title if necessary 2017-05-31 08:45:31 +03:00
convertToJson.spec.js style(aio): fix docs linting issues (#19702) 2017-11-01 15:24:46 -07:00
copyContentAssets.js build(aio): auto-fill width/height to all image tags 2017-05-01 15:52:51 -07:00
copyContentAssets.spec.js build(aio): move copyContentAssets processor to the base package 2017-05-01 15:52:51 -07:00
createSitemap.js build(aio): blacklist unwanted URLs from the generated sitemap.xml (#22061) 2018-02-07 12:02:01 -08:00
createSitemap.spec.js build(aio): blacklist unwanted URLs from the generated sitemap.xml (#22061) 2018-02-07 12:02:01 -08:00
fixInternalDocumentLinks.js build(aio): refactor dgeni packages 2017-04-23 22:50:33 +01:00
fixInternalDocumentLinks.spec.js build(aio): refactor dgeni packages 2017-04-23 22:50:33 +01:00
generateKeywords.js build(docs-infra): include inherited members in search index (#26676) 2018-10-26 13:16:33 -04:00
generateKeywords.spec.js build(docs-infra): include inherited members in search index (#26676) 2018-10-26 13:16:33 -04:00
renderLinkInfo.js build(aio): append information about links in and out of docs (#19583) 2017-10-10 17:06:51 -07:00
renderLinkInfo.spec.js build(aio): append information about links in and out of docs (#19583) 2017-10-10 17:06:51 -07:00