From a40310d8421a505c6c2550941ff29ccab0333ae1 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Thu, 7 May 2015 18:24:40 -0700 Subject: [PATCH] Update the quickstart for alpha22. We no longer need to use the quickstart repo since the published bundle works with Decorators. --- public/docs/js/latest/quickstart.jade | 45 +++++++++++++-------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/public/docs/js/latest/quickstart.jade b/public/docs/js/latest/quickstart.jade index 4158b33113..6bb6aa8725 100644 --- a/public/docs/js/latest/quickstart.jade +++ b/public/docs/js/latest/quickstart.jade @@ -1,9 +1,8 @@ .callout.is-helpful header Angular is in developer preview p. - This quickstart does not - reflect the final development process for Angular. The following setup is for those who - want to try out Angular while it is in developer preview. + This quickstart does not reflect the final development process for writing apps with Angular. + The following setup is for those who want to try out Angular while it is in developer preview. // STEP 1 - Create a project ########################## .l-main-section @@ -15,24 +14,26 @@ p. The goal of this quickstart is to write a component in TypeScript that prints a string. - To get started, clone the TypeScript quickstart repository: - - pre.prettyprint - $ git clone https://github.com/angular/ts-quickstart.git - $ cd ts-quickstart + We assume you have already installed Node and npm. p. - For the sake of this quickstart we recommend using the - quickstart GitHub repository. - This repository provides a faster start than building from npm. - This repository includes the Angular distribution and type definitions for TypeScript. - + To get started, create a new empty project directory. All the following commands should be run + from this directory. + p. - Create two files, index.html and - app.ts, both at the root of the project: + To get the benefits of TypeScript, we want to have the type definitions available for the compiler and the editor. + TypeScript type definitions are typically published in a repo called DefinitelyTyped. + To fetch one of the type definitions to the local directory, we use the tsd package manager. pre.prettyprint - $ touch app.ts index.html + $ npm install -g tsd + $ tsd query angular2 --action install + + p. + Next, create two empty files, index.html and app.ts, both at the root of the project: + + pre.prettyprint + $ touch app.ts index.html // STEP 2 - Start the TypeScript compiler ########################## .l-main-section @@ -43,14 +44,10 @@ your code to browser-compliant JavaScript as you work. This quickstart uses the TypeScript compiler in --watch mode, but it is also possible to do the translation in the browser as files are loaded, or configure your editor or IDE to do it. - p. - The repository includes a file tsconfig.json. - Many tools — including the TypeScript compiler — - know to read this file so we don't need to configure them or add command-line options. pre.prettyprint $ npm install -g typescript@^1.5.0-beta - $ tsc --watch + $ tsc --watch -m commonjs -t es5 --emitDecoratorMetadata app.ts // STEP 3 - Import Angular ########################## .l-main-section @@ -188,7 +185,7 @@ <head> <title>Angular 2 Quickstart</title> <script src="https://github.jspm.io/jmcriffey/bower-traceur-runtime@0.0.87/traceur-runtime.js"></script> - <script src="bundle/angular2.dev.js"></script> + <script src="https://code.angularjs.org/2.0.0-alpha.22/angular2.dev.js"></script> </head> <body> @@ -224,11 +221,11 @@ <title>Angular 2 Quickstart</title> <script src="https://github.jspm.io/jmcriffey/bower-traceur-runtime@0.0.87/traceur-runtime.js"></script> <script src="https://jspm.io/system@0.16.js"></script> - <script src="bundle/angular2.dev.js"></script> + <script src="https://code.angularjs.org/2.0.0-alpha.22/angular2.dev.js"></script> </head> p. - Add the following module-loading code before the <my-app> tag: + Add the following module-loading code: pre.prettyprint.linenums code.