2017-01-26 09:03:53 -05:00
|
|
|
# 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
|
|
|
|
|
2017-04-16 15:48:22 -04:00
|
|
|
To generate the documentation simply run `yarn docs` from the command line.
|
2017-01-26 09:03:53 -05:00
|
|
|
|
|
|
|
## Testing the dgeni packages
|
|
|
|
|
2017-04-16 15:48:22 -04:00
|
|
|
The local packages have unit tests that you can execute by running `yarn docs-test` from the command line.
|
2017-01-26 09:03:53 -05:00
|
|
|
|
|
|
|
## What does it generate?
|
|
|
|
|
2017-04-16 15:48:22 -04:00
|
|
|
The output from dgeni is written to files in the `src/content` folder.
|
2017-01-26 09:03:53 -05:00
|
|
|
|
2017-04-16 15:48:22 -04:00
|
|
|
Notably this includes a JSON file containing the partial HTML for each "page" of the documentation, such as API pages and guides.
|
|
|
|
It also includes JSON files that contain metadata about the documentation such as navigation data and
|
2017-01-26 09:03:53 -05:00
|
|
|
keywords for building a search index.
|
|
|
|
|
|
|
|
## Viewing the docs
|
|
|
|
|
2017-04-16 15:48:22 -04:00
|
|
|
You can view the pages by running `yarn start` and navigating to https://localhost:4200.
|