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

Commit a90e58d

Browse files
wardbellnaomiblack
authored andcommitted
(docs) quickstart: remove/rename getting-started artifacts throughout
1 parent f0bdd09 commit a90e58d

File tree

26 files changed

+69
-67
lines changed

26 files changed

+69
-67
lines changed

public/docs/_examples/gettingstarted/e2e-spec.js

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
describe('Protractor quick start test', function() {
2+
beforeEach(function() {
3+
browser.get('quickstart/index.html');
4+
});
5+
6+
// #docregion test
7+
it('should display Alice', function() {
8+
expect(element(by.id('output')).getText()).toEqual('Hello Alice');
9+
});
10+
// #enddocregion
11+
});
12+
Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
1-
describe('Protractor quick start test', function() {
2-
beforeEach(function() {
3-
browser.get('quickstart/index.html');
1+
/*global browser, element, by */
2+
describe('QuickStart E2E Tests', function () {
3+
4+
// #docregion shared
5+
var expectedMsg = 'My First Angular 2 App';
6+
7+
// tests shared across languages
8+
function sharedTests(basePath) {
9+
beforeEach(function () {
10+
browser.get(basePath + 'index.html');
11+
});
12+
13+
it('should display: ' + expectedMsg, function () {
14+
expect(element(by.css('h1')).getText()).toEqual(expectedMsg);
15+
});
16+
}
17+
// #enddocregion
18+
19+
describe('QuickStart in JavaScript', function () {
20+
sharedTests('quickstart/js/');
421
});
522

6-
// #docregion test
7-
it('should display Alice', function() {
8-
expect(element(by.id('output')).getText()).toEqual('Hello Alice');
23+
describe('QuickStart in TypeScript', function () {
24+
sharedTests('quickstart/ts/');
925
});
10-
// #enddocregion
11-
});
1226

27+
});

public/docs/js/latest/quickstart.jade

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ include ../../../_includes/_util-fns
1919
1. Run it
2020

2121
.l-main-section
22-
2322
:markdown
2423
## Create a project folder
2524

2625
**Create a new folder** to hold our application project, perhaps like this:
2726
```
28-
mkdir angular2-getting-started
29-
cd angular2-getting-started
27+
mkdir angular2-quickstart
28+
cd angular2-quickstart
3029
```
30+
.l-main-section
31+
:markdown
3132
## Install essential libraries
3233

3334
We'll use the **npm package manager** to install packages for
@@ -58,12 +59,12 @@ include ../../../_includes/_util-fns
5859
file named `package.json`.
5960
The essence of our `package.json` should look like this:
6061

61-
+makeJson('gettingstarted/js/package.json', { paths: 'name, version, dependencies, devDependencies'})
62+
+makeJson('quickstart/js/package.json', { paths: 'name, version, dependencies, devDependencies'})
6263

6364
:markdown
6465
There is also a `scripts` section. **Find and replace** it with the following:
6566

66-
+makeJson('gettingstarted/js/package.json', { paths: 'scripts'})
67+
+makeJson('quickstart/js/package.json', { paths: 'scripts'})
6768

6869
:markdown
6970
We've just extended our project world with a script command that we'll be running very soon.
@@ -74,7 +75,7 @@ include ../../../_includes/_util-fns
7475

7576
Add a new file called *app.js* and paste the following lines:
7677

77-
+makeExample('gettingstarted/js/app.js', 'class-w-annotations')
78+
+makeExample('quickstart/js/app.js', 'class-w-annotations')
7879

7980
:markdown
8081
We're creating a visual component named **`AppComponent`** by chaining the
@@ -111,7 +112,7 @@ include ../../../_includes/_util-fns
111112
We need to do something to put our application in motion.
112113
Add the following to the bottom of the `app.js` file:
113114

114-
+makeExample('gettingstarted/js/app.js', 'bootstrap')
115+
+makeExample('quickstart/js/app.js', 'bootstrap')
115116

116117
:markdown
117118
We'll wait for the browser to tell us that it has finished loading
@@ -130,15 +131,15 @@ include ../../../_includes/_util-fns
130131
wrapper.
131132

132133
Here is the entire file:
133-
+makeExample('gettingstarted/js/app.js', 'dsl')
134+
+makeExample('quickstart/js/app.js', 'dsl')
134135

135136
.l-main-section
136137
:markdown
137138
## Create an *index.html*
138139

139140
**Add a new `index.html`** file to the project folder and enter the following HTML
140141

141-
+makeExample('gettingstarted/js/index.html', null, 'index.html')(format="")
142+
+makeExample('quickstart/js/index.html', null, 'index.html')(format="")
142143
.l-sub-section
143144
:markdown
144145
Our app loads two script files in the `<head>` element:
@@ -179,7 +180,7 @@ include ../../../_includes/_util-fns
179180
In a few moments, a browser tab should open and display
180181

181182
figure.image-display
182-
img(src='/resources/images/devguide/getting-started/my-first-app.png' alt="Output of getting started app")
183+
img(src='/resources/images/devguide/quickstart/my-first-app.png' alt="Output of quickstart app")
183184

184185
:markdown
185186
### Make some changes

public/docs/ts/latest/quickstart.jade

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ include ../../../_includes/_util-fns
1010
in JavaScript and Dart by selecting either of those languages from the combo-box in the banner.
1111

1212
.l-main-section
13-
1413
:markdown
15-
# The shortest, quickest ...
14+
## The shortest, quickest ...
1615

1716
Let's put something on the screen in Angular 2 as quickly as we can.
1817

@@ -29,15 +28,16 @@ include ../../../_includes/_util-fns
2928
:markdown
3029
**Create a new folder** to hold our application project, perhaps like this:
3130
```
32-
mkdir angular2-getting-started
33-
cd angular2-getting-started
31+
mkdir angular2-quickstart
32+
cd angular2-quickstart
3433
```
35-
34+
.l-main-section
35+
:markdown
3636
## Our first Angular component
3737

3838
**Add a new file** called **`app.ts`** and paste the following lines:
3939

40-
+makeExample('gettingstarted/ts/src/app/app.ts', null, 'app.ts')
40+
+makeExample('quickstart/ts/src/app/app.ts', null, 'app.ts')
4141

4242
:markdown
4343
We've just defined an Angular 2 **component**,
@@ -80,13 +80,15 @@ include ../../../_includes/_util-fns
8080
We no longer expect to find our code or any library code in a global namespace.
8181
We `import` exactly what we need, as we need it, from named file and library resources.
8282

83+
.l-main-section
84+
:markdown
8385
## Add `index.html`
8486

8587
**Create** an `index.html` file.
8688

8789
**Paste** the following lines into it ... and we'll discuss them:
8890

89-
+makeExample('gettingstarted/ts/src/index.1.html', null, 'index.html')
91+
+makeExample('quickstart/ts/src/index.1.html', null, 'index.html')
9092

9193
:markdown
9294
We see three noteworthy sections of HTML:
@@ -107,6 +109,8 @@ include ../../../_includes/_util-fns
107109
That's the custom HTML element we identified in the `@Component` decoration
108110
adorning our `AppComponent` class.
109111

112+
.l-main-section
113+
:markdown
110114
## Run it!
111115

112116
We need a static file server to serve our application to the browser.
@@ -135,13 +139,12 @@ include ../../../_includes/_util-fns
135139
In a few moments, a browser tab should open and display
136140

137141
figure.image-display
138-
img(src='/resources/images/devguide/getting-started/my-first-app.png' alt="Output of getting started app")
142+
img(src='/resources/images/devguide/quickstart/my-first-app.png' alt="Output of quickstart app")
139143

140144
:markdown
141145
Congratulations! We are in business.
142146

143147
.l-main-section
144-
145148
:markdown
146149
## What's wrong with this?
147150

@@ -169,9 +172,8 @@ include ../../../_includes/_util-fns
169172
We have tools and procedures for that.
170173

171174
.l-main-section
172-
173175
:markdown
174-
# Upping our game
176+
## Upping our game
175177
Let's take a few more steps to put our development on a better foundation. We will
176178

177179
1. Revise the application project structure for future growth
@@ -185,7 +187,7 @@ include ../../../_includes/_util-fns
185187
:markdown
186188
## Revise the application project structure
187189

188-
At the moment we're dumping everything into the "angular2-getting-started" **root folder**.
190+
At the moment we're dumping everything into the "angular2-quickstart" **root folder**.
189191
Not bad when there are only two files. Not good as our application evolves.
190192

191193
Let's give our project a little structure.
@@ -211,15 +213,14 @@ include ../../../_includes/_util-fns
211213

212214
Our project folders should look like this.
213215
```
214-
angular2-getting-started
216+
angular2-quickstart
215217
└── src
216218
├── app
217219
│ └── app.ts
218220
└── index.html
219221
```
220222

221223
.l-main-section
222-
223224
:markdown
224225
## Install npm packages locally
225226

@@ -253,12 +254,12 @@ include ../../../_includes/_util-fns
253254
help us develop and maintain our application in future.
254255
The essence of our `package.json` should look like this:
255256

256-
+makeJson('gettingstarted/ts/package.json', { paths: 'name, version, dependencies, devDependencies'})
257+
+makeJson('quickstart/ts/package.json', { paths: 'name, version, dependencies, devDependencies'})
257258

258259
:markdown
259260
There is also a `scripts` section. **Find and replace** it with the following:
260261

261-
+makeJson('gettingstarted/ts/package.json', { paths: 'scripts'})
262+
+makeJson('quickstart/ts/package.json', { paths: 'scripts'})
262263

263264
:markdown
264265
We've just extended our project world with script commands
@@ -271,12 +272,12 @@ include ../../../_includes/_util-fns
271272
**Replace** the library scripts section with references to
272273
scripts in the packages we just installed.
273274

274-
+makeExample('gettingstarted/ts/src/index.html', 'libraries')
275+
+makeExample('quickstart/ts/src/index.html', 'libraries')
275276

276277
:markdown
277278
**Update** the `System` configuration script as follows.
278279

279-
+makeExample('gettingstarted/ts/src/index.html', 'systemjs')
280+
+makeExample('quickstart/ts/src/index.html', 'systemjs')
280281

281282
.l-sub-section
282283
:markdown
@@ -300,7 +301,7 @@ include ../../../_includes/_util-fns
300301
:markdown
301302
Here's the final version
302303

303-
+makeExample('gettingstarted/ts/src/index.html', null, 'index.html')
304+
+makeExample('quickstart/ts/src/index.html', null, 'index.html')
304305

305306
.l-main-section
306307
:markdown
@@ -313,7 +314,7 @@ include ../../../_includes/_util-fns
313314
to simplify the TypeScript compilation command that we'll run very soon.
314315

315316
**Change to the `src` folder and create a `tsconfig.json`** file with the following content:
316-
+makeJson('gettingstarted/ts/src/tsconfig.json', null, 'tsconfig.json')
317+
+makeJson('quickstart/ts/src/tsconfig.json', null, 'tsconfig.json')
317318

318319
.alert.is-helpful
319320
:markdown
@@ -325,7 +326,7 @@ include ../../../_includes/_util-fns
325326
## Final structure
326327
Our final project folder structure should look like this:
327328
```
328-
angular2-getting-started
329+
angular2-quickstart
329330
├── node_modules
330331
├── src
331332
│ ├── app
@@ -377,7 +378,7 @@ include ../../../_includes/_util-fns
377378
and displays our application message once more:
378379

379380
figure.image-display
380-
img(src='/resources/images/devguide/getting-started/my-first-app.png' alt="Output of getting started app")
381+
img(src='/resources/images/devguide/quickstart/my-first-app.png' alt="Output of quickstart app")
381382

382383
:markdown
383384
### Make some changes

0 commit comments

Comments
 (0)