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

Commit a40310d

Browse files
alexeaglenaomiblack
authored andcommitted
Update the quickstart for alpha22.
We no longer need to use the quickstart repo since the published bundle works with Decorators.
1 parent bd947b2 commit a40310d

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

public/docs/js/latest/quickstart.jade

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
.callout.is-helpful
22
header Angular is in developer preview
33
p.
4-
This quickstart does not
5-
reflect the final development process for Angular. The following setup is for those who
6-
want to try out Angular while it is in developer preview.
4+
This quickstart does not reflect the final development process for writing apps with Angular.
5+
The following setup is for those who want to try out Angular while it is in developer preview.
76

87
// STEP 1 - Create a project ##########################
98
.l-main-section
@@ -15,24 +14,26 @@
1514

1615
p.
1716
The goal of this quickstart is to write a component in TypeScript that prints a string.
18-
To get started, clone the TypeScript quickstart repository:
17+
We assume you have already installed <a href="https://docs.npmjs.com/getting-started/installing-node">Node and npm</a>.
1918

20-
pre.prettyprint
21-
$ git clone https://github.com/angular/ts-quickstart.git
22-
$ cd ts-quickstart
19+
p.
20+
To get started, create a new empty project directory. All the following commands should be run
21+
from this directory.
2322

2423
p.
25-
For the sake of this quickstart we recommend using the
26-
<a href="https://github.com/angular/ts-quickstart"> <code>quickstart</code> GitHub repository</a>.
27-
This repository provides a faster start than building from <code>npm</code>.
28-
This repository includes the Angular distribution and type definitions for TypeScript.
29-
24+
To get the benefits of TypeScript, we want to have the type definitions available for the compiler and the editor.
25+
TypeScript type definitions are typically published in a repo called <a href="http://definitelytyped.org/">DefinitelyTyped</a>.
26+
To fetch one of the type definitions to the local directory, we use the <a href="https://www.npmjs.com/package/tsd">tsd package manager</a>.
27+
28+
pre.prettyprint
29+
$ npm install -g tsd
30+
$ tsd query angular2 --action install
31+
3032
p.
31-
Create two files, <code>index.html</code> and
32-
<code>app.ts</code>, both at the root of the project:
33+
Next, create two empty files, <code>index.html</code> and <code>app.ts</code>, both at the root of the project:
3334

3435
pre.prettyprint
35-
$ touch app.ts index.html
36+
$ touch app.ts index.html
3637

3738
// STEP 2 - Start the TypeScript compiler ##########################
3839
.l-main-section
@@ -43,14 +44,10 @@
4344
your code to browser-compliant JavaScript as you work. This quickstart uses the TypeScript
4445
compiler in <code>--watch</code> mode, but it is also possible to do the translation in the browser as files
4546
are loaded, or configure your editor or IDE to do it.
46-
p.
47-
The repository includes a file <code>tsconfig.json</code>.
48-
Many tools &mdash; including the TypeScript compiler &mdash;
49-
know to read this file so we don't need to configure them or add command-line options.
5047

5148
pre.prettyprint
5249
$ npm install -g typescript@^1.5.0-beta
53-
$ tsc --watch
50+
$ tsc --watch -m commonjs -t es5 --emitDecoratorMetadata app.ts
5451

5552
// STEP 3 - Import Angular ##########################
5653
.l-main-section
@@ -188,7 +185,7 @@
188185
&lt;head&gt;
189186
&lt;title&gt;Angular 2 Quickstart&lt;/title&gt;
190187
&lt;script src="https://github.jspm.io/jmcriffey/[email protected]/traceur-runtime.js"&gt;&lt;/script&gt;
191-
&lt;script src="https://github.com/%3Cspan%20class="x x-first x-last">bundle/angular2.dev.js"&gt;&lt;/script&gt;
188+
&lt;script src="https://github.com/%3Cspan%20class="x x-first x-last">https://code.angularjs.org/2.0.0-alpha.22/angular2.dev.js"&gt;&lt;/script&gt;
192189
&lt;/head&gt;
193190
&lt;body&gt;
194191

@@ -224,11 +221,11 @@
224221
&lt;title&gt;Angular 2 Quickstart&lt;/title&gt;
225222
&lt;script src="https://github.jspm.io/jmcriffey/[email protected]/traceur-runtime.js"&gt;&lt;/script&gt;
226223
&lt;script src="https://jspm.io/[email protected]"&gt;&lt;/script&gt;
227-
&lt;script src="https://github.com/%3Cspan%20class="x x-first x-last">bundle/angular2.dev.js"&gt;&lt;/script&gt;
224+
&lt;script src="https://github.com/%3Cspan%20class="x x-first x-last">https://code.angularjs.org/2.0.0-alpha.22/angular2.dev.js"&gt;&lt;/script&gt;
228225
&lt;/head&gt;
229226

230227
p.
231-
Add the following module-loading code before the <code>&lt;my-app&gt;</code> tag:
228+
Add the following module-loading code:
232229

233230
pre.prettyprint.linenums
234231
code.

0 commit comments

Comments
 (0)