From ab4b109724242608067595d27675fe3d396f6d55 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 23 Jan 2017 15:09:02 +0000 Subject: [PATCH 01/11] chore: add src folder --- .gitignore | 5 +++-- README.md | 10 +++++----- bs-config.e2e.json | 13 +++++++++++++ bs-config.json | 8 ++++++++ karma-test-shim.js | 7 ++++--- karma.conf.js | 13 ++++++------- package.json | 7 ++++--- protractor.config.js | 2 +- {app => src/app}/app.component.spec.ts | 0 {app => src/app}/app.component.ts | 0 {app => src/app}/app.module.ts | 0 favicon.ico => src/favicon.ico | Bin index.html => src/index.html | 2 +- {app => src}/main.ts | 2 +- styles.css => src/styles.css | 10 +++++----- .../systemjs.config.extras.js | 0 systemjs.config.js => src/systemjs.config.js | 1 - 17 files changed, 51 insertions(+), 29 deletions(-) create mode 100644 bs-config.e2e.json create mode 100644 bs-config.json rename {app => src/app}/app.component.spec.ts (100%) rename {app => src/app}/app.component.ts (100%) rename {app => src/app}/app.module.ts (100%) rename favicon.ico => src/favicon.ico (100%) rename index.html => src/index.html (89%) rename {app => src}/main.ts (74%) rename styles.css => src/styles.css (94%) rename systemjs.config.extras.js => src/systemjs.config.extras.js (100%) rename systemjs.config.js => src/systemjs.config.js (98%) diff --git a/.gitignore b/.gitignore index 96d71f074..e411935b9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,9 @@ node_modules jspm_packages npm-debug.* -link-checker-results.txt -app/**/*.js +src/app/**/*.js +!src/systemjs.config.extras.js +!src/systemjs.config.js *.js.map e2e/**/*.js e2e/**/*.js.map diff --git a/README.md b/README.md index d86af6701..20cb78c29 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ with excellent support for Angular apps that use routing. Here are the test related scripts: * `npm test` - compiles, runs and watches the karma unit tests -* `npm run e2e` - run protractor e2e tests, written in JavaScript (*e2e-spec.js) +* `npm run e2e` - compiles and run protractor e2e tests, written in JavaScript (*e2e-spec.js) ## Testing @@ -128,9 +128,9 @@ These tools are configured for specific conventions described below. We recommend that you shut down one before starting another.* ### Unit Tests -TypeScript unit-tests are usually in the `app` folder. Their filenames must end in `.spec`. +TypeScript unit-tests are usually in the `src/app` folder. Their filenames must end in `.spec`. -Look for the example `app/app.component.spec.ts`. +Look for the example `src/app/app.component.spec.ts`. Add more `.spec.ts` files as you wish; we configured karma to find them. Run it with `npm test` @@ -147,7 +147,7 @@ restart it. No worries; it's pretty quick. ### End-to-end (E2E) Tests -E2E tests are in the `e2e` directory, side by side with the `app` folder. +E2E tests are in the `e2e` directory, side by side with the `src` folder. Their filenames must end in `.e2e-spec.ts`. Look for the example `e2e/app.e2e-spec.ts`. @@ -156,7 +156,7 @@ we configured protractor to find them. Thereafter, run them with `npm run e2e`. -That command first compiles, then simultaneously starts the Http-Server at `localhost:8080` +That command first compiles, then simultaneously starts the Http-Server at `localhost:3000` and launches protractor. The pass/fail test results appear at the bottom of the terminal window. diff --git a/bs-config.e2e.json b/bs-config.e2e.json new file mode 100644 index 000000000..623df5a52 --- /dev/null +++ b/bs-config.e2e.json @@ -0,0 +1,13 @@ +{ + "open": false, + "logLevel": "silent", + "server": { + "baseDir": "src", + "routes": { + "/node_modules": "node_modules" + }, + "middleware": { + "0": null + } + } +} diff --git a/bs-config.json b/bs-config.json new file mode 100644 index 000000000..4e5859526 --- /dev/null +++ b/bs-config.json @@ -0,0 +1,8 @@ +{ + "server": { + "baseDir": "src", + "routes": { + "/node_modules": "node_modules" + } + } +} diff --git a/karma-test-shim.js b/karma-test-shim.js index de5b015fd..fe5aa7761 100644 --- a/karma-test-shim.js +++ b/karma-test-shim.js @@ -7,8 +7,8 @@ Error.stackTraceLimit = 0; // "No stacktrace"" is usually best for app testing. jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000; // builtPaths: root paths for output ("built") files -// get from karma.config.js, then prefix with '/base/' (default is 'app/') -var builtPaths = (__karma__.config.builtPaths || ['app/']) +// get from karma.config.js, then prefix with '/base/' (default is 'src/') +var builtPaths = (__karma__.config.builtPaths || ['src/']) .map(function(p) { return '/base/'+p;}); __karma__.loaded = function () { }; @@ -34,7 +34,8 @@ var allSpecFiles = Object.keys(window.__karma__.files) .filter(isBuiltFile); System.config({ - baseURL: 'base', + // Base URL for System.js calls. 'base/' is where Karma serves files from. + baseURL: 'base/src', // Extend usual application package list with test folder packages: { 'testing': { main: 'index.js', defaultExtension: 'js' } }, diff --git a/karma.conf.js b/karma.conf.js index e765c4eb3..ee247d111 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,8 +1,7 @@ module.exports = function(config) { - var appBase = 'app/'; // transpiled app JS and map files - var appSrcBase = 'app/'; // app source TS files - var appAssets = '/base/app/'; // component assets fetched by Angular's compiler + var appBase = 'src/'; // transpiled app JS and map files + var appSrcBase = appBase; // app source TS files // Testing helpers (optional) are conventionally in a folder called `testing` var testingBase = 'testing/'; // transpiled test JS and map files @@ -57,8 +56,8 @@ module.exports = function(config) { { pattern: 'node_modules/@angular/**/*.js', included: false, watched: false }, { pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false }, - { pattern: 'systemjs.config.js', included: false, watched: false }, - { pattern: 'systemjs.config.extras.js', included: false, watched: false }, + { pattern: appBase + '/systemjs.config.js', included: false, watched: false }, + { pattern: appBase + '/systemjs.config.extras.js', included: false, watched: false }, 'karma-test-shim.js', // optionally extend SystemJS mapping e.g., with barrels // transpiled application & spec code paths loaded via module imports @@ -80,8 +79,8 @@ module.exports = function(config) { // Proxied base paths for loading assets proxies: { - // required for component assets fetched by Angular's compiler - "/app/": appAssets + // required for modules fetched by SystemJS + '/base/src/node_modules/': '/base/node_modules/' }, exclude: [], diff --git a/package.json b/package.json index b806db2c9..45a86bed9 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,12 @@ "description": "QuickStart package.json from the documentation, supplemented with testing support", "scripts": { "start": "tsc && concurrently \"tsc -w\" \"lite-server\" ", - "e2e": "tsc && concurrently \"http-server -s\" \"protractor protractor.config.js\" --kill-others --success first", - "lint": "tslint ./app/**/*.ts -t verbose", + "lint": "tslint ./src/**/*.ts -t verbose", "lite": "lite-server", + "lite:e2e": "lite-server -c=bs-config.e2e.json", "pree2e": "webdriver-manager update", + "e2e": "tsc && concurrently \"npm run lite:e2e\" \"npm run protractor\" --kill-others --success first", + "protractor": "protractor protractor.config.js", "test": "tsc && concurrently \"tsc -w\" \"karma start karma.conf.js\"", "test-once": "tsc && karma start karma.conf.js --single-run", "tsc": "tsc", @@ -38,7 +40,6 @@ "typescript": "~2.0.10", "canonical-path": "0.0.2", - "http-server": "^0.9.0", "tslint": "^3.15.1", "lodash": "^4.16.4", "jasmine-core": "~2.4.1", diff --git a/protractor.config.js b/protractor.config.js index 8314510c5..97ccad17a 100644 --- a/protractor.config.js +++ b/protractor.config.js @@ -34,7 +34,7 @@ exports.config = { useAllAngular2AppRoots: true, // Base URL for application server - baseUrl: 'http://localhost:8080', + baseUrl: 'http://localhost:3000', // doesn't seem to work. // resultJsonOutputFile: "foo.json", diff --git a/app/app.component.spec.ts b/src/app/app.component.spec.ts similarity index 100% rename from app/app.component.spec.ts rename to src/app/app.component.spec.ts diff --git a/app/app.component.ts b/src/app/app.component.ts similarity index 100% rename from app/app.component.ts rename to src/app/app.component.ts diff --git a/app/app.module.ts b/src/app/app.module.ts similarity index 100% rename from app/app.module.ts rename to src/app/app.module.ts diff --git a/favicon.ico b/src/favicon.ico similarity index 100% rename from favicon.ico rename to src/favicon.ico diff --git a/index.html b/src/index.html similarity index 89% rename from index.html rename to src/index.html index 17df408e4..01a0ff37f 100644 --- a/index.html +++ b/src/index.html @@ -14,7 +14,7 @@ diff --git a/app/main.ts b/src/main.ts similarity index 74% rename from app/main.ts rename to src/main.ts index 6af7a5b2a..311c44b76 100644 --- a/app/main.ts +++ b/src/main.ts @@ -1,5 +1,5 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app.module'; +import { AppModule } from './app/app.module'; platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/styles.css b/src/styles.css similarity index 94% rename from styles.css rename to src/styles.css index c30a0620d..58e1a7d9a 100644 --- a/styles.css +++ b/src/styles.css @@ -1,5 +1,5 @@ -h1 { - color: #369; - font-family: Arial, Helvetica, sans-serif; - font-size: 250%; -} +h1 { + color: #369; + font-family: Arial, Helvetica, sans-serif; + font-size: 250%; +} diff --git a/systemjs.config.extras.js b/src/systemjs.config.extras.js similarity index 100% rename from systemjs.config.extras.js rename to src/systemjs.config.extras.js diff --git a/systemjs.config.js b/src/systemjs.config.js similarity index 98% rename from systemjs.config.js rename to src/systemjs.config.js index 68caa9f4c..e91ba9b3c 100644 --- a/systemjs.config.js +++ b/src/systemjs.config.js @@ -30,7 +30,6 @@ // packages tells the System loader how to load when no filename and/or no extension packages: { app: { - main: './main.js', defaultExtension: 'js' }, rxjs: { From c21bccbcf5d8f4e0ae71b1b8b83d751bfc08c789 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 24 Jan 2017 09:47:16 +0000 Subject: [PATCH 02/11] incorporate Jesus's feedback --- README.md | 10 +++++----- bs-config.e2e.json | 1 + protractor.config.js | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 20cb78c29..164de0d9d 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ with excellent support for Angular apps that use routing. Here are the test related scripts: * `npm test` - compiles, runs and watches the karma unit tests -* `npm run e2e` - compiles and run protractor e2e tests, written in JavaScript (*e2e-spec.js) +* `npm run e2e` - compiles and run protractor e2e tests, written in Typescript (*e2e-spec.ts) ## Testing @@ -128,7 +128,7 @@ These tools are configured for specific conventions described below. We recommend that you shut down one before starting another.* ### Unit Tests -TypeScript unit-tests are usually in the `src/app` folder. Their filenames must end in `.spec`. +TypeScript unit-tests are usually in the `src/app` folder. Their filenames must end in `.spec.ts`. Look for the example `src/app/app.component.spec.ts`. Add more `.spec.ts` files as you wish; we configured karma to find them. @@ -152,12 +152,12 @@ Their filenames must end in `.e2e-spec.ts`. Look for the example `e2e/app.e2e-spec.ts`. Add more `.e2e-spec.js` files as you wish (although one usually suffices for small projects); -we configured protractor to find them. +we configured Protractor to find them. Thereafter, run them with `npm run e2e`. -That command first compiles, then simultaneously starts the Http-Server at `localhost:3000` -and launches protractor. +That command first compiles, then simultaneously starts the `lite-server` at `localhost:8080` +and launches Protractor. The pass/fail test results appear at the bottom of the terminal window. A custom reporter (see `protractor.config.js`) generates a `./_test-output/protractor-results.txt` file diff --git a/bs-config.e2e.json b/bs-config.e2e.json index 623df5a52..24570dbcc 100644 --- a/bs-config.e2e.json +++ b/bs-config.e2e.json @@ -1,6 +1,7 @@ { "open": false, "logLevel": "silent", + "port": 8080, "server": { "baseDir": "src", "routes": { diff --git a/protractor.config.js b/protractor.config.js index 97ccad17a..8314510c5 100644 --- a/protractor.config.js +++ b/protractor.config.js @@ -34,7 +34,7 @@ exports.config = { useAllAngular2AppRoots: true, // Base URL for application server - baseUrl: 'http://localhost:3000', + baseUrl: 'http://localhost:8080', // doesn't seem to work. // resultJsonOutputFile: "foo.json", From b7b045896e0cea1f92bddbccb723f2cafa052ef2 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Jan 2017 18:14:37 +0000 Subject: [PATCH 03/11] move tsconfig.json into src/e2e --- .gitignore | 2 +- .travis.yml | 2 +- README.md | 6 +++--- tsconfig.json => e2e/tsconfig.json | 0 package.json | 25 +++++++++++++++---------- src/tsconfig.json | 13 +++++++++++++ 6 files changed, 33 insertions(+), 15 deletions(-) rename tsconfig.json => e2e/tsconfig.json (100%) create mode 100644 src/tsconfig.json diff --git a/.gitignore b/.gitignore index e411935b9..d77437894 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ node_modules jspm_packages npm-debug.* -src/app/**/*.js +src/**/*.js !src/systemjs.config.extras.js !src/systemjs.config.js *.js.map diff --git a/.travis.yml b/.travis.yml index 20ff41e7d..808bc2c4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,5 +16,5 @@ install: - npm install script: - npm run lint - - npm run test-once + - npm run test:once - npm run e2e diff --git a/README.md b/README.md index 164de0d9d..ab6bca93a 100644 --- a/README.md +++ b/README.md @@ -106,9 +106,9 @@ You're ready to write your application. We've captured many of the most useful commands in npm scripts defined in the `package.json`: * `npm start` - runs the compiler and a server at the same time, both in "watch mode". -* `npm run tsc` - runs the TypeScript compiler once. -* `npm run tsc:w` - runs the TypeScript compiler in watch mode; the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them. -* `npm run lite` - runs the [lite-server](https://www.npmjs.com/package/lite-server), a light-weight, static file server, written and maintained by +* `npm run build` - runs the TypeScript compiler once. +* `npm run build:w` - runs the TypeScript compiler in watch mode; the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them. +* `npm run serve` - runs the [lite-server](https://www.npmjs.com/package/lite-server), a light-weight, static file server, written and maintained by [John Papa](https://github.com/johnpapa) and [Christopher Martin](https://github.com/cgmartin) with excellent support for Angular apps that use routing. diff --git a/tsconfig.json b/e2e/tsconfig.json similarity index 100% rename from tsconfig.json rename to e2e/tsconfig.json diff --git a/package.json b/package.json index 45a86bed9..f1affa892 100644 --- a/package.json +++ b/package.json @@ -3,17 +3,22 @@ "version": "1.0.0", "description": "QuickStart package.json from the documentation, supplemented with testing support", "scripts": { - "start": "tsc && concurrently \"tsc -w\" \"lite-server\" ", - "lint": "tslint ./src/**/*.ts -t verbose", - "lite": "lite-server", - "lite:e2e": "lite-server -c=bs-config.e2e.json", - "pree2e": "webdriver-manager update", - "e2e": "tsc && concurrently \"npm run lite:e2e\" \"npm run protractor\" --kill-others --success first", + "build": "tsc -p src/", + "build:watch": "tsc -p src/ -w", + "build:e2e": "tsc -p e2e/", + "serve": "lite-server", + "serve:e2e": "lite-server -c=bs-config.e2e.json", + "prestart": "npm run build", + "start": "concurrently \"npm run build:watch\" \"npm run serve\"", + "pree2e": "webdriver-manager update && npm run build:e2e", + "e2e": "concurrently \"npm run serve:e2e\" \"npm run protractor\" --kill-others --success first", "protractor": "protractor protractor.config.js", - "test": "tsc && concurrently \"tsc -w\" \"karma start karma.conf.js\"", - "test-once": "tsc && karma start karma.conf.js --single-run", - "tsc": "tsc", - "tsc:w": "tsc -w" + "pretest": "npm run build", + "test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"", + "pretest:once": "npm run build", + "sleep": "sleep 1", + "test:once": "karma start karma.conf.js --single-run", + "lint": "tslint ./src/**/*.ts -t verbose" }, "keywords": [], "author": "", diff --git a/src/tsconfig.json b/src/tsconfig.json new file mode 100644 index 000000000..2c7260d1b --- /dev/null +++ b/src/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "lib": [ "es2015", "dom" ], + "noImplicitAny": true, + "suppressImplicitAnyIndexErrors": true + } +} From baf1cafc68ca7f5cb7072c69aff6ee832eadd528 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Jan 2017 18:51:40 +0000 Subject: [PATCH 04/11] add base href --- src/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.html b/src/index.html index 01a0ff37f..6d6e22326 100644 --- a/src/index.html +++ b/src/index.html @@ -4,6 +4,7 @@ Angular QuickStart + From 9b568cf529b64c32fd6e14a6dd9be4e54af40585 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Fri, 27 Jan 2017 18:51:48 +0000 Subject: [PATCH 05/11] ignore debug.log --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d77437894..a60a4dbce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ .idea node_modules jspm_packages -npm-debug.* +npm-debug.log +debug.log src/**/*.js !src/systemjs.config.extras.js !src/systemjs.config.js From efb6c755b809326188c4dfb7407dd0b097ebbffd Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 28 Jan 2017 21:58:55 +0000 Subject: [PATCH 06/11] remove unused npm script --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index f1affa892..5eca363db 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "pretest": "npm run build", "test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"", "pretest:once": "npm run build", - "sleep": "sleep 1", "test:once": "karma start karma.conf.js --single-run", "lint": "tslint ./src/**/*.ts -t verbose" }, From 60fdae1f8778121271022bffaf85c199c8bc8a42 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 30 Jan 2017 22:04:52 +0000 Subject: [PATCH 07/11] some protractor changes --- package.json | 3 ++- protractor.config.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5eca363db..6aa8ec42c 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,9 @@ "serve:e2e": "lite-server -c=bs-config.e2e.json", "prestart": "npm run build", "start": "concurrently \"npm run build:watch\" \"npm run serve\"", - "pree2e": "webdriver-manager update && npm run build:e2e", + "pree2e": "npm run build:e2e", "e2e": "concurrently \"npm run serve:e2e\" \"npm run protractor\" --kill-others --success first", + "preprotractor": "webdriver-manager update", "protractor": "protractor protractor.config.js", "pretest": "npm run build", "test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"", diff --git a/protractor.config.js b/protractor.config.js index 8314510c5..8d4e0416a 100644 --- a/protractor.config.js +++ b/protractor.config.js @@ -5,7 +5,7 @@ // // AND THEN EVERYTIME ... // 1. Compile with `tsc` -// 2. Make sure the test server (e.g., http-server: localhost:8080) is running. +// 2. Make sure the test server (e.g., lite-server: localhost:8080) is running. // 3. ./node_modules/.bin/protractor protractor.config.js // // To do all steps, try: `npm run e2e` From e7ef7f7197afc22c0b5248612f3624bf39d50aa7 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Tue, 31 Jan 2017 23:49:22 +0000 Subject: [PATCH 08/11] remove appSrcBase --- karma.conf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/karma.conf.js b/karma.conf.js index ee247d111..5a51e814f 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -71,7 +71,7 @@ module.exports = function(config) { { pattern: appBase + '**/*.css', included: false, watched: true }, // Paths for debugging with source maps in dev tools - { pattern: appSrcBase + '**/*.ts', included: false, watched: false }, + { pattern: appBase + '**/*.ts', included: false, watched: false }, { pattern: appBase + '**/*.js.map', included: false, watched: false }, { pattern: testingSrcBase + '**/*.ts', included: false, watched: false }, { pattern: testingBase + '**/*.js.map', included: false, watched: false} From 35a765e055c4df550d7833645c6e6422aa910eb3 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 1 Feb 2017 17:06:24 +0000 Subject: [PATCH 09/11] explicitely list config for npm run serve --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6aa8ec42c..ca4da28fc 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "build": "tsc -p src/", "build:watch": "tsc -p src/ -w", "build:e2e": "tsc -p e2e/", - "serve": "lite-server", + "serve": "lite-server -c=bs-config.json", "serve:e2e": "lite-server -c=bs-config.e2e.json", "prestart": "npm run build", "start": "concurrently \"npm run build:watch\" \"npm run serve\"", From 96ff19e627d5875258de70b5fa6cb373c647649e Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 2 Feb 2017 13:59:16 +0000 Subject: [PATCH 10/11] add update instructions --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index ab6bca93a..8eabff1e2 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,23 @@ It exists primarily to get you started quickly with learning and prototyping in We are unlikely to accept suggestions about how to grow this QuickStart into something it is not. Please keep that in mind before posting issues and PRs. +## Updating to a newer version of the Quickstart Repo + +From time to time the QuickStart will add be enhanced with support for new features or to reflect +changes to the [official Style Guide](https://angular.io/docs/ts/latest/guide/style-guide.html). + +You can update your existing project to an up-to-date QuickStart by following these instructions: +- Create a new project using the [instructions below](#create-a-new-project-based-on-the-quickstart) +- Copy the code you have in your project's `main.ts` file onto `src/app/main.ts` in the new project +- Copy your old `app` folder into `src/app` +- Delete `src/app/main.ts` if you have one (we now use `src/main.ts` instead) +- Copy your old `index.html`, `styles.css` and `tsconfig.json` into `src/` +- Copy your old `e2e/` folder into `e2e/` +- Copy over any other files you added to your project +- Copy your old `.git` folder into your new project's root + +Now you can continue working on the new project. + ## Prerequisites Node.js and npm are essential to Angular development. From f42165ca7ff99ad1ee9e64ebedd93bf6b2f99cbc Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Thu, 2 Feb 2017 16:43:28 +0000 Subject: [PATCH 11/11] Add third party deps note to update section --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8eabff1e2..a5e4eff0c 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ You can update your existing project to an up-to-date QuickStart by following th - Copy your old `app` folder into `src/app` - Delete `src/app/main.ts` if you have one (we now use `src/main.ts` instead) - Copy your old `index.html`, `styles.css` and `tsconfig.json` into `src/` +- Install all your third party dependencies - Copy your old `e2e/` folder into `e2e/` - Copy over any other files you added to your project - Copy your old `.git` folder into your new project's root