docs(cache): misc adjustments for Dart (#2830)

* docs(cache): misc adjustments for Dart

Dart cache adjustments:
- Add guide/index (it was being inherited directly from latest before).
- Add proper cache of `_quickstart_repo.jade` (it used to be just an
include).

Also:
- In `_quickstart_repo.jade` use variable set to URL of repo.
- Fix newly added link to Quickstart in guide/index.jade.

* dart/displaying-data: just use TS's _quickstart_repo
This commit is contained in:
Patrice Chalin 2016-11-18 14:55:21 -08:00 committed by Filipe Silva
parent f915746262
commit 2d3836c8c1
14 changed files with 126 additions and 24 deletions

View File

@ -39,6 +39,7 @@
- var _liveLink = 'live link'; - var _liveLink = 'live link';
- var _ngRepoURL = 'https://github.com/angular/angular'; - var _ngRepoURL = 'https://github.com/angular/angular';
- var _ngDocRepoURL = 'https://github.com/angular/angular.io'; - var _ngDocRepoURL = 'https://github.com/angular/angular.io';
- var _qsRepo = 'https://github.com/angular/quickstart/blob/master/README.md'
//- NgModule related //- NgModule related
- var _AppModuleVsAppComp = 'AppModule' - var _AppModuleVsAppComp = 'AppModule'

View File

@ -1,4 +0,0 @@
.l-sub-section
:marked
Alternatively, begin with a
[download of the QuickStart source](https://github.com/angular-examples/quickstart/archive/master.zip).

View File

@ -22,6 +22,7 @@ include ../../../_includes/_util-fns
- var _ngRepoURL = 'https://github.com/dart-lang/angular2'; - var _ngRepoURL = 'https://github.com/dart-lang/angular2';
//- Don't override this value quite yet: //- Don't override this value quite yet:
//- var _ngDocRepoURL = 'https://github.com/dart-lang/site-webdev'; //- var _ngDocRepoURL = 'https://github.com/dart-lang/site-webdev';
- var _qsRepo = 'https://github.com/angular-examples/quickstart/archive/master.zip'
//- NgModule related //- NgModule related
- var _AppModuleVsAppComp = 'AppComponent' - var _AppModuleVsAppComp = 'AppComponent'

View File

@ -5,10 +5,6 @@ block includes
- var _iterableUrl = 'https://api.dartlang.org/stable/dart-core/Iterable-class.html'; - var _iterableUrl = 'https://api.dartlang.org/stable/dart-core/Iterable-class.html';
- var _boolean = 'boolean'; - var _boolean = 'boolean';
block quickstart-repo
//- Must have this block so that Jade picks up the Dart include.
include ../_quickstart_repo
block hero-class block hero-class
:marked :marked
We've defined a class with a constructor, two properties (`id` and `name`), We've defined a class with a constructor, two properties (`id` and `name`),

View File

@ -1,4 +1,4 @@
extends ../../../ts/latest/guide/index.jade extends ../../../ts/_cache/guide/index.jade
block includes block includes
include ../_util-fns include ../_util-fns

View File

@ -7,7 +7,6 @@ block includes
- var _angular_browser_uri = 'angular2/platform/browser.dart' - var _angular_browser_uri = 'angular2/platform/browser.dart'
- var _angular_core_uri = 'angular2/core.dart' - var _angular_core_uri = 'angular2/core.dart'
- var _stepInit = 3 - var _stepInit = 3
- var _quickstartSrcURL='https://github.com/angular-examples/quickstart'
block setup-tooling block setup-tooling
:marked :marked

View File

@ -1 +1,3 @@
include ../latest/_quickstart_repo .l-sub-section
:marked
Alternatively, begin with a [download of the QuickStart source](!{_qsRepo}).

View File

@ -39,9 +39,6 @@ figure.image-display
Create a new project folder (<ngio-ex path="displaying-data"></ngio-ex>) and follow the steps in the [QuickStart](../quickstart.html). Create a new project folder (<ngio-ex path="displaying-data"></ngio-ex>) and follow the steps in the [QuickStart](../quickstart.html).
block quickstart-repo
include ../_quickstart_repo
:marked :marked
Then modify the <ngio-ex path="app.component.ts"></ngio-ex> file by Then modify the <ngio-ex path="app.component.ts"></ngio-ex> file by
changing the template and the body of the component. changing the template and the body of the component.

View File

@ -0,0 +1,114 @@
block includes
include ../_util-fns
figure
img(src="/resources/images/devguide/intro/people.png" alt="Us" align="left" style="width:200px; margin-left:-40px;margin-right:10px")
:marked
This is a practical guide to Angular for experienced programmers who
are building client applications in HTML and #{_Lang}. <br class="l-clear-left">
## Organization
The documentation is divided into major thematic sections, each
a collection of pages devoted to that theme.
block js-alert
- var __lang = _docsFor || current.path[1] || 'ts';
- var guideData = public.docs[__lang].latest.guide._data;
- var advancedLandingPage = '';
- for(var page in guideData) {
- if (!guideData[page].basics && !guideData[page].hide) { advancedLandingPage = page; break; }
- }
- var advancedUrl = './' + advancedLandingPage + '.html'
- var top="vertical-align:top"
table(width="100%")
col(width="15%")
col
tr(style=top)
td <b><a href="../quickstart.html">QuickStart</a></b>
td
:marked
The foundation for every page and sample in this documentation.
tr(style=top)
td <b><a href="./">Guide</a></b>
td
:marked
The essential ingredients of Angular development.
tr(style=top)
td <b><a href="../api">API Reference</a></b>
td
:marked
Authoritative details about each member of the Angular libraries.
tr(style=top)
td <b><a href="../tutorial">Tutorial</a></b>
td
:marked
A step-by-step, immersive approach to learning Angular that
introduces the major features of Angular in an application context.
tr(style=top)
td <b><a href="!{advancedUrl}">Advanced</a></b>
td
:marked
In-depth analysis of Angular features and development practices.
tr(style=top)
td <b><a href="../cookbook">Cookbook</a></b>
td
:marked
Recipes for specific application challenges, mostly code snippets with a minimum of exposition.
:marked
## Learning path
You don't have to read the guide straight through. Most pages stand on their own.
For those new to Angular, the recommended learning path runs through the *Guide* section:
1. For the big picture, read the [Architecture](architecture.html) overview.
1. Try [QuickStart](../quickstart.html). QuickStart is the "Hello, World" of Angular.
It shows you how to set up the libraries and tools you'll need to write *any* Angular app.
1. Take the *Tour of Heroes* [tutorial](../tutorial), which picks up where QuickStart leaves off,
and builds a simple data-driven app. The app demonstrates the essential characteristics of a professional application:
a sensible project structure, data binding, master/detail, services, dependency injection, navigation, and remote data access.
1. [Displaying Data](displaying-data.html) explains how to display information on the screen.
1. [User Input](user-input.html) covers how Angular responds to user behavior.
1. [Forms](forms.html) handles user data entry and validation within the UI.
1. [Dependency Injection](dependency-injection.html) is the way to build large, maintainable applications
from small, single-purpose parts.
1. [Template Syntax](template-syntax.html) is a comprehensive study of Angular template HTML.
After reading the above sections, you can skip to any other pages on this site.
## Code samples
Each page includes code snippets that you can reuse in your applications.
These snippets are excerpts from a sample application that accompanies the page.
Look for a link to a running version of that sample near the top of each page,
such as this <live-example name="architecture"></live-example> from the [Architecture](architecture.html) page.
<p if-docs="ts">
The link launches a browser-based code editor where you can inspect, modify, save, and download the code.
</p>
A few early pages are written as tutorials and are clearly marked as such.
The rest of the pages highlight key points in code rather than explain each step necessary to build the sample.
You can always get the full source through the #{_liveLink}.
## Reference pages
- The [Cheat Sheet](cheatsheet.html) lists Angular syntax for common scenarios.
- The [Glossary](glossary.html) defines terms that Angular developers should know.
- The [API Reference](../api/) is the authority on every public-facing member of the Angular libraries.
## We welcome feedback!
- Use the [website GitHub repo](!{_ngDocRepoURL}) for **documentation** issues and pull requests.
- Use the [Angular GitHub repo](!{_ngRepoURL}) to report issues with **Angular** itself.

View File

@ -1,4 +1,3 @@
.l-sub-section .l-sub-section
:marked :marked
Alternatively, begin with a Alternatively, begin with a [download of the QuickStart source](!{_qsRepo}).
[download of the QuickStart source](https://github.com/angular/quickstart/blob/master/README.md).

View File

@ -37,9 +37,6 @@ figure.image-display
To build an illustrative example, start by creating a new project folder called <ngio-ex path="displaying-data"></ngio-ex> To build an illustrative example, start by creating a new project folder called <ngio-ex path="displaying-data"></ngio-ex>
and following the steps in [QuickStart](../quickstart.html). and following the steps in [QuickStart](../quickstart.html).
block quickstart-repo
include ../_quickstart_repo
:marked :marked
Then modify the <ngio-ex path="app.component.ts"></ngio-ex> file by Then modify the <ngio-ex path="app.component.ts"></ngio-ex> file by
changing the template and the body of the component. changing the template and the body of the component.

View File

@ -6,8 +6,7 @@ figure
:marked :marked
This is a practical guide to Angular for experienced programmers who This is a practical guide to Angular for experienced programmers who
are building client applications in HTML and #{_Lang}. are building client applications in HTML and #{_Lang}. <br class="l-clear-left">
<br class="l-clear-left">
## Organization ## Organization
@ -28,7 +27,7 @@ table(width="100%")
col(width="15%") col(width="15%")
col col
tr(style=top) tr(style=top)
td <b><a href="../quickstart">QuickStart</a></b> td <b><a href="../quickstart.html">QuickStart</a></b>
td td
:marked :marked
The foundation for every page and sample in this documentation. The foundation for every page and sample in this documentation.

View File

@ -5,7 +5,6 @@ block includes
- var _angular_browser_uri = '@angular/platform-browser-dynamic' - var _angular_browser_uri = '@angular/platform-browser-dynamic'
- var _angular_core_uri = '@angular/core' - var _angular_core_uri = '@angular/core'
- var _stepInit = 4 // Step # after NgModule step - var _stepInit = 4 // Step # after NgModule step
- var _quickstartSrcURL='https://github.com/angular/quickstart/blob/master/README.md'
//- TS/Dart shared step counter //- TS/Dart shared step counter
- var step = _stepInit - var step = _stepInit

View File

@ -15,6 +15,7 @@ guide/component-styles.jade
guide/dependency-injection.jade guide/dependency-injection.jade
guide/displaying-data.jade guide/displaying-data.jade
guide/hierarchical-dependency-injection.jade guide/hierarchical-dependency-injection.jade
guide/index.jade
guide/lifecycle-hooks.jade guide/lifecycle-hooks.jade
guide/pipes.jade guide/pipes.jade
guide/security.jade guide/security.jade
@ -23,6 +24,7 @@ guide/structural-directives.jade
guide/template-syntax.jade guide/template-syntax.jade
glossary.jade glossary.jade
quickstart.jade quickstart.jade
_quickstart_repo.jade
tutorial/index.jade tutorial/index.jade
tutorial/toh-pt5.jade tutorial/toh-pt5.jade
tutorial/toh-pt6.jade" tutorial/toh-pt6.jade"
@ -60,7 +62,7 @@ function cacheRefresh() {
} }
function cacheDiffSummary() { function cacheDiffSummary() {
diff -qr -x "_*.*" "$CACHE/" "$LATEST/" | \ diff -qr -x "_util*.jade" "$CACHE/" "$LATEST/" | \
grep -v "^Only in" grep -v "^Only in"
} }