angular-cn/aio/tools/transforms
Pete Bacon Darwin 538286df16 build(docs-infra): add path disambiguation (#41788)
When two documents have the same `outputPath`, only differing by
letter casing, there can be problems on case-insensitive file-systems:
Only one of each of the docs would end up being written.

Moreover, the Webpack 5 bundler will error if it comes across files
that have this kind of ambiguous paths.

This commit adds a new docType: `disambiguator`, which will display
a list of the docs that match an ambiguous path. Each of the ambiguous
docs is then given a unique path and outputPath to ensure there are no
collisions.

PR Close #41788
2021-04-26 12:12:00 -07:00
..
angular-api-package build(docs-infra): no duplicate docTypes in postProcessHtml processor (#41788) 2021-04-26 12:11:59 -07:00
angular-base-package build(docs-infra): add path disambiguation (#41788) 2021-04-26 12:12:00 -07:00
angular-content-package build(docs-infra): move docs-watch settings to a base package (#40479) 2021-01-20 16:12:15 -08:00
angular-errors-package docs: add embedded videos to error guides (#40453) 2021-01-20 08:47:00 -08:00
angular.io-package build(docs-infra): move docs-watch settings to a base package (#40479) 2021-01-20 16:12:15 -08:00
authors-package build(docs-infra): update `eslint` and `eslint-plugin-jasmine` to latest versions (#41429) 2021-04-06 10:22:53 -07:00
cli-docs-package fix(docs-infra): correctly generate CLI commands docs when the overview page moves (#38365) 2020-08-06 11:41:05 -07:00
content-package build(docs-infra): implement `@reviewed` tag definition (#40582) 2021-01-28 09:04:49 -08:00
examples-package build(docs-infra): fail if there are unused example regions (#40479) 2021-01-20 16:12:15 -08:00
helpers build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
links-package build(docs-infra): move docs-watch settings to a base package (#40479) 2021-01-20 16:12:15 -08:00
remark-package build(docs-infra): update `eslint` and `eslint-plugin-jasmine` to latest versions (#41429) 2021-04-06 10:22:53 -07:00
target-package build(aio): move the `transforms` folder into the `tools` folder 2017-04-16 22:05:23 +01:00
templates build(docs-infra): add path disambiguation (#41788) 2021-04-26 12:12:00 -07:00
.eslintignore build(aio): move the `transforms` folder into the `tools` folder 2017-04-16 22:05:23 +01:00
.eslintrc.js build: update stemmer to version 2.0.0 (#41724) 2021-04-26 11:00:59 -07:00
README.md docs(docs-infra): apply the one-sentence-per-line rule to Markdown files in `aio/tools/` (#38992) 2020-09-30 09:20:00 -04:00
config.js build(aio): ignore example files that are gitignored 2017-06-09 14:33:21 +01:00
test.js build(docs-infra): ensure that jasmine node tests fail on build error (#41596) 2021-04-13 11:54:15 -07:00

README.md

Overview

All the content that is rendered by the AIO application, and some of its configuration files, are generated from source files by Dgeni. Dgeni is a general purpose documentation generation tool.

Markdown files in /aio/content, code comments in the core Angular source files and example files are processed and transformed into files that are consumed by the AIO application.

Dgeni is configured by "packages", which contain services and processors. Some of these packages are installed as node_modules from the dgeni-packages and some are specific to the AIO project.

The project specific packages are stored in this folder (aio/tools/transforms).

If you are an author and want to know how to generate the documentation, the steps are outlined in the top level README.md.

Root packages

To run Dgeni, you must specify a root package, which acts as the entry point to the documentation generation. This root package, in turn requires a number of other packages, some are defined locally in the tools/transforms folder, such as tools/transforms/cheatsheet-package and tools/transforms/content-package, etc. And some are brought in from the dgeni-packages node modules, such as jsdoc and nunjucks.

  • The primary root package is defined in tools/transforms/angular.io-package/index.js. This package is used to run a full generation of all the documentation.
  • There are also root packages defined in tools/transforms/authors-package/*-package.js. These packages are used by the documentation authors when writing docs, since it allows them to run partial doc generation, which is not complete but is faster for quickly seeing changes to the document that you are working on.

Other packages

  • angular-base-package
  • angular-api-package
  • angular-content-package
  • content-package
  • examples-package
  • links-package
  • post-process-package
  • remark-package
  • target-package

Templates

All the templates for the angular.io dgeni transformations are stoted in the tools/transforms/templates folder. See the README.