3f8d5ac478
This change allows the example writer to add doc-region annotations to files that do not allow comments. This is done by creating a clone of the file and adding `.annotated` to the file name. This new file can contain inline `// ...` comments that can be used to annotate the doc regions. Example: **package.json** ``` { "name": "angular.io", "version": "0.0.0", "main": "index.js", "repository": "git@github.com:angular/angular.git", "author": "Angular", "license": "MIT", "private": true, } ```` **package.json.annotated** ``` { "name": "angular.io", // #docregion version "version": "0.0.0", // #enddocregion "main": "index.js", "repository": "git@github.com:angular/angular.git", "author": "Angular", "license": "MIT", "private": true, } ```` This region can then be referenced in examples just like any other doc region: ``` {@example 'package.json' region="version"} ``` |
||
---|---|---|
.. | ||
angular.io-package | ||
cheatsheet-package | ||
content-package | ||
examples-package | ||
helpers | ||
links-package | ||
rho-package | ||
target-package | ||
templates | ||
README.md | ||
eslintrc.js |
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