Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 2d3836c

Browse files
chalinfilipesilva
authored andcommitted
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
1 parent f915746 commit 2d3836c

14 files changed

+126
-24
lines changed

public/_includes/_util-fns.jade

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
- var _liveLink = 'live link';
4040
- var _ngRepoURL = 'https://github.com/angular/angular';
4141
- var _ngDocRepoURL = 'https://github.com/angular/angular.io';
42+
- var _qsRepo = 'https://github.com/angular/quickstart/blob/master/README.md'
4243

4344
//- NgModule related
4445
- var _AppModuleVsAppComp = 'AppModule'

public/docs/dart/latest/_quickstart_repo.jade

-4
This file was deleted.

public/docs/dart/latest/_util-fns.jade

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ include ../../../_includes/_util-fns
2222
- var _ngRepoURL = 'https://github.com/dart-lang/angular2';
2323
//- Don't override this value quite yet:
2424
//- var _ngDocRepoURL = 'https://github.com/dart-lang/site-webdev';
25+
- var _qsRepo = 'https://github.com/angular-examples/quickstart/archive/master.zip'
2526

2627
//- NgModule related
2728
- var _AppModuleVsAppComp = 'AppComponent'

public/docs/dart/latest/guide/displaying-data.jade

-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ block includes
55
- var _iterableUrl = 'https://api.dartlang.org/stable/dart-core/Iterable-class.html';
66
- var _boolean = 'boolean';
77

8-
block quickstart-repo
9-
//- Must have this block so that Jade picks up the Dart include.
10-
include ../_quickstart_repo
11-
128
block hero-class
139
:marked
1410
We've defined a class with a constructor, two properties (`id` and `name`),
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extends ../../../ts/latest/guide/index.jade
1+
extends ../../../ts/_cache/guide/index.jade
22

33
block includes
44
include ../_util-fns

public/docs/dart/latest/quickstart.jade

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ block includes
77
- var _angular_browser_uri = 'angular2/platform/browser.dart'
88
- var _angular_core_uri = 'angular2/core.dart'
99
- var _stepInit = 3
10-
- var _quickstartSrcURL='https://github.com/angular-examples/quickstart'
1110

1211
block setup-tooling
1312
:marked
+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
include ../latest/_quickstart_repo
1+
.l-sub-section
2+
:marked
3+
Alternatively, begin with a [download of the QuickStart source](!{_qsRepo}).

public/docs/ts/_cache/guide/displaying-data.jade

-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ figure.image-display
3939

4040
Create a new project folder (<ngio-ex path="displaying-data"></ngio-ex>) and follow the steps in the [QuickStart](../quickstart.html).
4141

42-
block quickstart-repo
43-
include ../_quickstart_repo
44-
4542
:marked
4643
Then modify the <ngio-ex path="app.component.ts"></ngio-ex> file by
4744
changing the template and the body of the component.
+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
block includes
2+
include ../_util-fns
3+
4+
figure
5+
img(src="/resources/images/devguide/intro/people.png" alt="Us" align="left" style="width:200px; margin-left:-40px;margin-right:10px")
6+
7+
:marked
8+
This is a practical guide to Angular for experienced programmers who
9+
are building client applications in HTML and #{_Lang}. <br class="l-clear-left">
10+
11+
## Organization
12+
13+
The documentation is divided into major thematic sections, each
14+
a collection of pages devoted to that theme.
15+
16+
block js-alert
17+
18+
- var __lang = _docsFor || current.path[1] || 'ts';
19+
- var guideData = public.docs[__lang].latest.guide._data;
20+
- var advancedLandingPage = '';
21+
- for(var page in guideData) {
22+
- if (!guideData[page].basics && !guideData[page].hide) { advancedLandingPage = page; break; }
23+
- }
24+
- var advancedUrl = './' + advancedLandingPage + '.html'
25+
- var top="vertical-align:top"
26+
table(width="100%")
27+
col(width="15%")
28+
col
29+
tr(style=top)
30+
td <b><a href="../quickstart.html">QuickStart</a></b>
31+
td
32+
:marked
33+
The foundation for every page and sample in this documentation.
34+
tr(style=top)
35+
td <b><a href="./">Guide</a></b>
36+
td
37+
:marked
38+
The essential ingredients of Angular development.
39+
tr(style=top)
40+
td <b><a href="../api">API Reference</a></b>
41+
td
42+
:marked
43+
Authoritative details about each member of the Angular libraries.
44+
tr(style=top)
45+
td <b><a href="../tutorial">Tutorial</a></b>
46+
td
47+
:marked
48+
A step-by-step, immersive approach to learning Angular that
49+
introduces the major features of Angular in an application context.
50+
tr(style=top)
51+
td <b><a href="!{advancedUrl}">Advanced</a></b>
52+
td
53+
:marked
54+
In-depth analysis of Angular features and development practices.
55+
tr(style=top)
56+
td <b><a href="../cookbook">Cookbook</a></b>
57+
td
58+
:marked
59+
Recipes for specific application challenges, mostly code snippets with a minimum of exposition.
60+
61+
:marked
62+
## Learning path
63+
64+
You don't have to read the guide straight through. Most pages stand on their own.
65+
66+
For those new to Angular, the recommended learning path runs through the *Guide* section:
67+
68+
1. For the big picture, read the [Architecture](architecture.html) overview.
69+
70+
1. Try [QuickStart](../quickstart.html). QuickStart is the "Hello, World" of Angular.
71+
It shows you how to set up the libraries and tools you'll need to write *any* Angular app.
72+
73+
1. Take the *Tour of Heroes* [tutorial](../tutorial), which picks up where QuickStart leaves off,
74+
and builds a simple data-driven app. The app demonstrates the essential characteristics of a professional application:
75+
a sensible project structure, data binding, master/detail, services, dependency injection, navigation, and remote data access.
76+
77+
1. [Displaying Data](displaying-data.html) explains how to display information on the screen.
78+
79+
1. [User Input](user-input.html) covers how Angular responds to user behavior.
80+
81+
1. [Forms](forms.html) handles user data entry and validation within the UI.
82+
83+
1. [Dependency Injection](dependency-injection.html) is the way to build large, maintainable applications
84+
from small, single-purpose parts.
85+
86+
1. [Template Syntax](template-syntax.html) is a comprehensive study of Angular template HTML.
87+
88+
After reading the above sections, you can skip to any other pages on this site.
89+
90+
## Code samples
91+
92+
Each page includes code snippets that you can reuse in your applications.
93+
These snippets are excerpts from a sample application that accompanies the page.
94+
95+
Look for a link to a running version of that sample near the top of each page,
96+
such as this <live-example name="architecture"></live-example> from the [Architecture](architecture.html) page.
97+
<p if-docs="ts">
98+
The link launches a browser-based code editor where you can inspect, modify, save, and download the code.
99+
</p>
100+
101+
A few early pages are written as tutorials and are clearly marked as such.
102+
The rest of the pages highlight key points in code rather than explain each step necessary to build the sample.
103+
You can always get the full source through the #{_liveLink}.
104+
105+
## Reference pages
106+
107+
- The [Cheat Sheet](cheatsheet.html) lists Angular syntax for common scenarios.
108+
- The [Glossary](glossary.html) defines terms that Angular developers should know.
109+
- The [API Reference](../api/) is the authority on every public-facing member of the Angular libraries.
110+
111+
## We welcome feedback!
112+
113+
- Use the [website GitHub repo](!{_ngDocRepoURL}) for **documentation** issues and pull requests.
114+
- Use the [Angular GitHub repo](!{_ngRepoURL}) to report issues with **Angular** itself.
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
.l-sub-section
22
:marked
3-
Alternatively, begin with a
4-
[download of the QuickStart source](https://github.com/angular/quickstart/blob/master/README.md).
3+
Alternatively, begin with a [download of the QuickStart source](!{_qsRepo}).

public/docs/ts/latest/guide/displaying-data.jade

-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ figure.image-display
3737
To build an illustrative example, start by creating a new project folder called <ngio-ex path="displaying-data"></ngio-ex>
3838
and following the steps in [QuickStart](../quickstart.html).
3939

40-
block quickstart-repo
41-
include ../_quickstart_repo
42-
4340
:marked
4441
Then modify the <ngio-ex path="app.component.ts"></ngio-ex> file by
4542
changing the template and the body of the component.

public/docs/ts/latest/guide/index.jade

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ figure
66

77
:marked
88
This is a practical guide to Angular for experienced programmers who
9-
are building client applications in HTML and #{_Lang}.
10-
<br class="l-clear-left">
9+
are building client applications in HTML and #{_Lang}. <br class="l-clear-left">
1110

1211
## Organization
1312

@@ -28,7 +27,7 @@ table(width="100%")
2827
col(width="15%")
2928
col
3029
tr(style=top)
31-
td <b><a href="../quickstart">QuickStart</a></b>
30+
td <b><a href="../quickstart.html">QuickStart</a></b>
3231
td
3332
:marked
3433
The foundation for every page and sample in this documentation.

public/docs/ts/latest/quickstart.jade

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ block includes
55
- var _angular_browser_uri = '@angular/platform-browser-dynamic'
66
- var _angular_core_uri = '@angular/core'
77
- var _stepInit = 4 // Step # after NgModule step
8-
- var _quickstartSrcURL='https://github.com/angular/quickstart/blob/master/README.md'
98

109
//- TS/Dart shared step counter
1110
- var step = _stepInit

scripts/cache.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ guide/component-styles.jade
1515
guide/dependency-injection.jade
1616
guide/displaying-data.jade
1717
guide/hierarchical-dependency-injection.jade
18+
guide/index.jade
1819
guide/lifecycle-hooks.jade
1920
guide/pipes.jade
2021
guide/security.jade
@@ -23,6 +24,7 @@ guide/structural-directives.jade
2324
guide/template-syntax.jade
2425
glossary.jade
2526
quickstart.jade
27+
_quickstart_repo.jade
2628
tutorial/index.jade
2729
tutorial/toh-pt5.jade
2830
tutorial/toh-pt6.jade"
@@ -60,7 +62,7 @@ function cacheRefresh() {
6062
}
6163

6264
function cacheDiffSummary() {
63-
diff -qr -x "_*.*" "$CACHE/" "$LATEST/" | \
65+
diff -qr -x "_util*.jade" "$CACHE/" "$LATEST/" | \
6466
grep -v "^Only in"
6567
}
6668

0 commit comments

Comments
 (0)