angular-docs-cn/tools/docs
Pete Bacon Darwin d4ffa47ea6 fix(aio): correctly render decorator docs (#14328)
This commit updates the doc-gen to account
for the changes to the codebase for decorators.

There are actually three kinds of calls that create decorators:

* makeDecorator
* makePropDecorator
* makeParamDecorator

Also, the actual documentation for each
decorator is split between two exported symbols:

* `interface [DecoratorName]` contains the metadata fields
* interface [DecoratorName]Decorator` contains a
  "call member" which holds the general description of the decorator.

This processor now identifies all three decorator types, and pulls the
description of the callMember onto the main decorator doc description.

(There are some outstanding interfaces in the angular/angular project that
need to be re-exported from `/angular/modules/@angular/core/src/metadata.ts`
to ensure that the doc-gen is able to access them.)

Closes https://github.com/angular/angular.io/pull/2349
2017-02-07 00:04:25 -08:00
..
angular.io-package fix(aio): correctly render decorator docs (#14328) 2017-02-07 00:04:25 -08:00
cheatsheet-package build(aio): move doc-gen stuff from angular.io (#14097) 2017-01-26 23:46:59 -08:00
content-package build(aio): support guide authoring 2017-02-06 12:08:57 -08:00
examples-package build(aio): support guide authoring 2017-02-06 12:08:57 -08:00
helpers build(aio): move doc-gen stuff from angular.io (#14097) 2017-01-26 23:46:59 -08:00
links-package build(aio): move doc-gen stuff from angular.io (#14097) 2017-01-26 23:46:59 -08:00
rho-package build(aio): support guide authoring 2017-02-06 12:08:57 -08:00
target-package build(aio): move doc-gen stuff from angular.io (#14097) 2017-01-26 23:46:59 -08:00
README.md build(aio): move doc-gen stuff from angular.io (#14097) 2017-01-26 23:46:59 -08:00
eslintrc.js build(aio): move doc-gen stuff from angular.io (#14097) 2017-01-26 23:46:59 -08:00

README.md

Documentation Generation

The dgeni tool is used to generate the documentation from the source files held in this repository. The documentation generation is configured by a dgeni package defined in docs/angular.io-package/index.js. This package, in turn requires a number of other packages, some are defined locally in the docs folder, such as docs/cheatsheet-package and docs/content-package, etc. And some are brought in from the dgeni-packages node modules, such as jsdoc and nunjucks.

Generating the docs

To generate the documentation simply run gulp docs from the command line.

Testing the dgeni packages

The local packages have unit tests that you can execute by running gulp docs-test from the command line.

What does it generate?

The output from dgeni is written to files in the dist/docs folder.

Notably this includes a partial HTML file for each "page" of the documentation, such as API pages and guides. It also includes JavaScript files that contain metadata about the documentation such as navigation data and keywords for building a search index.

Viewing the docs

You can view the dummy demo app using a simple HTTP server hosting dist/docs/index.html