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

Commit b7ee016

Browse files
wardbellnaomiblack
authored andcommitted
(docs) gettingstarted: Update to alpha-37 and latest guidance
-- squashed commits -- (examples) gettingstarted: Update to alpha-37 (fix) gettingstarted: remove id=output from template; e2e spec looks for h1 instead (fix) gettingstarted: simplified tsd commands (fix) gettingstarted: simplified tsd commands gettingStarted.jade updated for tooling-4 (docs) gettingstarted example revised for system 0.19, tsd 0.6.5, and as preface to ToH (docs) update gettingstarted to our current recommendation (still needs to be vetted) (docs) fix:gettingStarted.jade - small clarification after following instructions on clean directory. (docs) gettingstarted jade updated w/ tool version advice and John's suggestions
1 parent 4565918 commit b7ee016

File tree

12 files changed

+192
-166
lines changed

12 files changed

+192
-166
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Getting Started E2E Tests', function () {
1111
});
1212

1313
it('should display: ' + expectedMsg, function () {
14-
expect(element(by.id('output')).getText()).toEqual(expectedMsg);
14+
expect(element(by.css('h1')).getText()).toEqual(expectedMsg);
1515
});
1616
}
1717
// #enddocregion

public/docs/_examples/gettingstarted/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var AppComponent = ng
99
// #enddocregion
1010
// #docregion view
1111
.View({
12-
template: '<h1 id="output">My First Angular 2 App</h1>'
12+
template: '<h1>My First Angular 2 App</h1>'
1313
})
1414
// #enddocregion
1515
// #docregion class

public/docs/_examples/gettingstarted/ts/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#Getting Started (TS) for the DevGuide developer
22

3-
This is the source code for the "Getting Started" Typescrip example code.
4-
5-
There are files here that are *for the audience* and **not to be executed during example development**!
3+
This is the source code for the "Getting Started" Typescript example code.
64

75
* **package.json** - as the audience will see it; the example reaches up to the site level **node_modules**
86
and the scripts are not supposed to work here.
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
2-
"name": "ng2-getting-started",
3-
"version": "0.0.1",
4-
"dependencies": {
5-
"angular2": "2.0.0-alpha.35",
6-
"es6-module-loader": "^0.16",
7-
"systemjs": "^0.16",
8-
"traceur": "0.0.91"
9-
},
2+
"name": "angular2-getting-started",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
106
"scripts": {
11-
"postinstall": "cd src && tsd reinstall -r -o && cd ..",
12-
"tsc": "tsc -p src -w",
13-
"start": "live-server --open=src"
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"keywords": [],
10+
"author": "",
11+
"license": "ISC",
12+
"dependencies": {
13+
"angular2": "^2.0.0-alpha.37",
14+
"systemjs": "^0.19.2"
1415
}
1516
}
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
// #docregion
22
// #docregion import
33
import {Component, View, bootstrap} from 'angular2/angular2';
4-
// #enddocregion
5-
4+
// #enddocregion import
65
// #docregion class-w-annotations
76
@Component({
87
selector: 'my-app'
98
})
109
@View({
11-
template: '<h1 id="output">My First Angular 2 App</h1>'
10+
template: '<h1>My First Angular 2 App</h1>'
1211
})
1312
// #docregion class
1413
class AppComponent { }
15-
// #enddocregion
16-
// #enddocregion
14+
// #enddocregion class
15+
// #enddocregion class-w-annotations
1716

1817
// #docregion bootstrap
1918
bootstrap(AppComponent);
20-
// #enddocregion
21-
// #enddocregion
19+
// #enddocregion bootstrap

public/docs/_examples/gettingstarted/ts/src/dummy.spec.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
<!-- #docregion -->
21
<!DOCTYPE html>
2+
<!-- #docregion -->
33
<html>
44
<head>
55
<script src="../node_modules/traceur/bin/traceur-runtime.js"></script>
6-
<script src="../node_modules/es6-module-loader/dist/es6-module-loader.js"></script>
76
<script src="../node_modules/systemjs/dist/system.src.js"></script>
87
<script src="../node_modules/angular2/bundles/angular2.dev.js"></script>
98
</head>
9+
1010
<body>
11-
<my-app></my-app>
11+
<my-app>Loading...</my-app>
1212
<script>
13-
System.import('app');
13+
System.config({
14+
packages: {'app': {defaultExtension: 'js'}}
15+
});
16+
System.import('app/app');
1417
</script>
1518
</body>
16-
</html>
19+
20+
</html>

public/docs/_examples/gettingstarted/ts/src/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"module": "commonjs",
55
"sourceMap": true,
66
"emitDecoratorMetadata": true,
7-
"experimentalDecorators": true
7+
"experimentalDecorators": true,
8+
"removeComments": false,
9+
"noImplicitAny": true
810
}
911
}

public/docs/_examples/gettingstarted/ts/src/tsd.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

public/docs/_examples/styleguide/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{
2-
"name": "ng2-getting-started",
2+
"name": "getting-started",
33
"version": "0.0.1",
44
"dependencies": {
5-
"angular2": "2.0.0-alpha.35",
6-
"es6-module-loader": "^0.16",
7-
"systemjs": "^0.16",
5+
"angular2": "2.0.0-alpha.37",
6+
"systemjs": "^0.18.17",
87
"traceur": "0.0.91"
98
},
109
"scripts": {

public/docs/js/latest/guide/gettingStarted.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ include ../../../../_includes/_util-fns
165165
in the root directory of our application.
166166

167167
pre.prettyprint.lang-bash
168-
code tsd query angular2 es6-promise rx rx-lite jasmine --action install --save
168+
code tsd install angular2 --save
169169

170170
:markdown
171171
We'll find a ***typings*** folder in the root directory

0 commit comments

Comments
 (0)