Commit Graph

9 Commits

Author SHA1 Message Date
Pete Bacon Darwin 8b4edcc7ad build(aio): output `{@example}` tags as `<code-example>` elements (#15382) 2017-03-22 13:24:40 -07:00
Peter Bacon Darwin 1282da1b14 feat(aio): support unannotated JSON example files 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin b92f52649b fix(aio): remove unused `getExampleFilename` service 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin 3f8d5ac478 feat(aio): support annotating JSON files with doc-regions
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"}
```
2017-02-23 23:23:58 -08:00
Peter Bacon Darwin 649bab8ff8 fix(aio): handle html docregions that do not end on the same line 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin 6a9251874b fix(aio): region parser error line numbers were off by one 2017-02-23 23:23:58 -08:00
Peter Bacon Darwin c208f97461 fix(aio): correctly handle "empty" region names 2017-02-23 23:23:58 -08:00
Ward Bell 9a6f3d637f feat(aio): add sidenav driven by navigation data (#14429) 2017-02-15 11:22:37 -08:00
Pete Bacon Darwin 600402d440 build(aio): big move of docs related files (#14361)
All the docs related files (docs-app, doc-gen, content, etc)
are now to be found inside the `/aio` folder.

The related gulp tasks have been moved from the top level
gulp file to a new one inside the `/aio` folder.

The structure of the `/aio` folder now looks like:

```
/aio/
  build/         # gulp tasks
  content/       #MARKDOWN FILES for devguides, cheatsheet, etc
    devguides/
    cheatsheets/
  transforms/    #dgeni packages, templates, etc
  src/
    app/
    assets/
    content/    #HTML + JSON build artifacts produced by dgeni from /aio/content.
                #This dir is .gitignored-ed
  e2e/           #protractor tests for the doc viewer app
  node_modules/ #dependencies for both the doc viewer builds and the dgeni stuff
                #This dir is .gitignored-ed
  gulpfile.js   #Tasks for generating docs and building & deploying the doc viewer
```

Closes #14361
2017-02-09 11:58:36 -08:00