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

Commit 168ecda

Browse files
committed
chore: update to typescript 2.0
1 parent 2c9e78c commit 168ecda

File tree

71 files changed

+64
-12591
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+64
-12591
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ node_modules
22
_temp
33
bower_components
44
jspm_packages
5-
typings
65
**/packages
76
build
87
pubspec.lock

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ take the following extra steps to prepare the environment:
8989
1. cd back up to `angular.io` root: `cd ../../..`
9090

9191
1. run `gulp add-example-boilerplate` (elevate to admin on Windows)
92-
to copy canonical files to the sample directories and create symlinks there for node_modules and typings.
92+
to copy canonical files to the sample directories and create symlinks there for node_modules.
9393

9494
Now cd into any particular sample's language directory (e.g., `public/docs/_examples/quickstart/ts`) and try:
9595
- `npm start` to simultaneously compile-with-watch and serve-in-browser-with-watch

gulpfile.js

+3-25
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ var _apiShredOptionsForDart = {
8282
logLevel: _dgeniLogLevel
8383
};
8484

85-
var _excludePatterns = ['**/node_modules/**', '**/typings/**', '**/packages/**'];
85+
var _excludePatterns = ['**/node_modules/**', '**/packages/**'];
8686

8787
var _excludeMatchers = _excludePatterns.map(function(excludePattern){
8888
return new Minimatch(excludePattern)
@@ -98,7 +98,6 @@ var _exampleBoilerplateFiles = [
9898
'systemjs.config.js',
9999
'tsconfig.json',
100100
'tslint.json',
101-
'typings.json',
102101
'wallaby.js'
103102
];
104103

@@ -447,13 +446,6 @@ gulp.task('add-example-boilerplate', function(done) {
447446
fsUtils.addSymlink(realPath, linkPath);
448447
});
449448

450-
realPath = path.join(EXAMPLES_PATH, '/typings');
451-
var typingsPaths = excludeDartPaths(getTypingsPaths(EXAMPLES_PATH));
452-
typingsPaths.forEach(function(linkPath) {
453-
gutil.log("symlinking " + linkPath + ' -> ' + realPath)
454-
fsUtils.addSymlink(realPath, linkPath);
455-
});
456-
457449
return buildStyles(copyExampleBoilerplate, done);
458450
});
459451

@@ -512,11 +504,6 @@ gulp.task('remove-example-boilerplate', function() {
512504
fsUtils.removeSymlink(linkPath);
513505
});
514506

515-
var typingsPaths = getTypingsPaths(EXAMPLES_PATH);
516-
typingsPaths.forEach(function(linkPath) {
517-
fsUtils.removeSymlink(linkPath);
518-
});
519-
520507
deleteExampleBoilerPlate();
521508
});
522509

@@ -805,7 +792,7 @@ gulp.task('_harp-compile', function() {
805792

806793
gulp.task('_shred-devguide-examples', ['_shred-clean-devguide', '_copy-example-boilerplate'], function() {
807794
// Split big shredding task into partials 2016-06-14
808-
var examplePaths = globby.sync(EXAMPLES_PATH+'/*/', {ignore: ['/node_modules', 'typings/', '_protractor/']});
795+
var examplePaths = globby.sync(EXAMPLES_PATH+'/*/', {ignore: ['/node_modules', '_protractor/']});
809796
var promise = Promise.resolve(true);
810797
examplePaths.forEach(function (examplePath) {
811798
promise = promise.then(() => docShredder.shredSingleExampleDir(_devguideShredOptions, examplePath));
@@ -865,8 +852,6 @@ gulp.task('lint', function() {
865852
'!./public/docs/_examples/style-guide/ts/**/*.avoid.ts',
866853
'!./public/docs/_examples/**/node_modules/**/*',
867854
'!./public/docs/_examples/_protractor/**/*',
868-
'!./public/docs/_examples/**/typings/**/*',
869-
'!./public/docs/_examples/**/typings-ng1/**/*',
870855
'!./public/docs/_examples/**/build/**/*',
871856
// temporary until codelyzer is fixed mgechev/codelyzer#60
872857
'!./public/docs/_examples/animations/ts/app/hero.service.ts'
@@ -1114,13 +1099,6 @@ function getNodeModulesPaths(basePath) {
11141099
return paths;
11151100
}
11161101

1117-
function getTypingsPaths(basePath) {
1118-
var paths = getExamplePaths(basePath).map(function(examplePath) {
1119-
return path.join(examplePath, "/typings");
1120-
});
1121-
return paths;
1122-
}
1123-
11241102
function getExamplePaths(basePath, includeBase) {
11251103
// includeBase defaults to false
11261104
return getPaths(basePath, _exampleConfigFilename, includeBase)
@@ -1245,7 +1223,7 @@ function devGuideExamplesWatch(shredOptions, postShredAction, focus) {
12451223
// removed this version because gulp.watch has the same glob issue that dgeni has.
12461224
// var excludePattern = '!' + path.join(shredOptions.examplesDir, '**/node_modules/**/*.*');
12471225
// gulp.watch([includePattern, excludePattern], {readDelay: 500}, function (event, done) {
1248-
var ignoreThese = [ '**/node_modules/**', '**/_fragments/**', '**/dist/**', '**/typings/**',
1226+
var ignoreThese = [ '**/node_modules/**', '**/_fragments/**', '**/dist/**',
12491227
'**/dart/.pub/**', '**/dart/build/**', '**/dart/packages/**'];
12501228
ignoreThese = ignoreThese.concat(_exampleBoilerplateFiles.map((file) => `public/docs/_examples/*/*/${file}`));
12511229
var files = globby.sync( [includePattern], { ignore: ignoreThese });

public/docs/_examples/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ package.json
77
systemjs.config.js
88
tsconfig.json
99
tslint.json
10-
typings.json
1110
wallaby.js
1211

1312
protractor.config.js

public/docs/_examples/_protractor/e2e.d.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/// <reference path="typings/index.d.ts" />
2-
31
// Defined in protractor.config.js
42
declare function setProtractorToNg1Mode(): void;
53
declare function sendKeys(element: protractor.ElementFinder, str: string): webdriver.promise.Promise<void>;

public/docs/_examples/_protractor/package.json

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33
"version": "1.0.0",
44
"description": "Manage _protractor folder installations",
55
"scripts": {
6-
"postinstall": "typings install",
7-
"typings": "typings",
86
"protractor": "protractor",
9-
"webdriver:update": "webdriver-manager update"
7+
"webdriver:update": "webdriver-manager update",
8+
"tsc": "tsc"
109
},
1110
"keywords": [],
1211
"author": "",
1312
"license": "ISC",
1413
"devDependencies": {
14+
"@types/jasmine": "^2.2.33",
15+
"@types/node": "^4.0.30",
16+
"@types/protractor": "^1.5.18",
1517
"protractor": "^3.3.0",
16-
"typings": "^1.0.4"
18+
"ts-node": "^1.3.0",
19+
"typescript": "^2.0.2"
1720
},
1821
"repository": {}
1922
}

public/docs/_examples/_protractor/tsconfig.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
"experimentalDecorators": true,
99
"removeComments": false,
1010
"noImplicitAny": true,
11-
"suppressImplicitAnyIndexErrors": true
11+
"suppressImplicitAnyIndexErrors": true,
12+
"typeRoots": [
13+
"node_modules/@types"
14+
]
1215
},
1316
"files": [
1417
"e2e-spec.ts"

public/docs/_examples/_protractor/typings.json

-8
This file was deleted.

public/docs/_examples/cli-quickstart/ts/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
/libpeerconnection.log
1919
npm-debug.log
2020
testem.log
21-
/typings
2221

2322
# e2e
2423
/e2e/*.js
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
/// <reference path="../typings/index.d.ts" />

public/docs/_examples/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
"http-server:e2e": "http-server",
1010
"http-server:cli": "http-server dist/",
1111
"lite": "lite-server",
12-
"postinstall": "typings install",
1312
"test": "tsc && concurrently \"tsc -w\" \"karma start karma.conf.js\"",
1413
"tsc": "tsc",
1514
"tsc:w": "tsc -w",
16-
"typings": "typings",
1715
"protractor": "protractor",
1816
"webdriver:update": "webdriver-manager update",
1917
"start:webpack": "webpack-dev-server --inline --progress --port 8080",
@@ -44,7 +42,10 @@
4442
"zone.js": "^0.6.17"
4543
},
4644
"devDependencies": {
47-
"angular-cli": "^1.0.0-beta.5",
45+
"@types/angular": "^1.5.13",
46+
"@types/core-js": "^0.9.32",
47+
"@types/jasmine": "^2.2.33",
48+
"@types/node": "^4.0.30",
4849
"angular2-template-loader": "^0.4.0",
4950
"canonical-path": "0.0.2",
5051
"concurrently": "^2.2.0",
@@ -72,10 +73,9 @@
7273
"rimraf": "^2.5.2",
7374
"style-loader": "^0.13.1",
7475
"ts-loader": "^0.8.2",
75-
"ts-node": "^0.7.3",
76+
"ts-node": "^1.3.0",
7677
"tslint": "^3.15.1",
77-
"typescript": "^1.8.10",
78-
"typings": "^1.3.2",
78+
"typescript": "^2.0.2",
7979
"webpack": "^1.13.0",
8080
"webpack-dev-server": "^1.14.1",
8181
"webpack-merge": "^0.14.0"

public/docs/_examples/quickstart/ts/package.1.json

+4-7
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
"scripts": {
55
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
66
"lite": "lite-server",
7-
"postinstall": "typings install",
87
"tsc": "tsc",
9-
"tsc:w": "tsc -w",
10-
"typings": "typings"
8+
"tsc:w": "tsc -w"
119
},
1210
"license": "ISC",
1311
"dependencies": {
@@ -32,9 +30,8 @@
3230
"bootstrap": "^3.3.6"
3331
},
3432
"devDependencies": {
35-
"concurrently": "^2.2.0",
36-
"lite-server": "^2.2.2",
37-
"typescript": "^1.8.10",
38-
"typings":"^1.3.2"
33+
"concurrently": "^2.0.0",
34+
"lite-server": "^2.2.0",
35+
"typescript": "2.0.0"
3936
}
4037
}

public/docs/_examples/quickstart/ts/typings.1.json

-7
This file was deleted.

public/docs/_examples/style-guide/ts/05-15/app/heroes/shared/hero.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { Injectable } from '@angular/core';
33
import { Observable } from 'rxjs/Rx';
44

5-
import { Hero } from './hero.model.ts';
5+
import { Hero } from './hero.model';
66

77
@Injectable()
88
export class HeroService {

public/docs/_examples/style-guide/ts/05-17/app/heroes/hero-list/hero-list.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// #docregion
33
import { Component } from '@angular/core';
44

5-
import { Hero } from '../shared/hero.model.ts';
5+
import { Hero } from '../shared/hero.model';
66

77
// #docregion example
88
@Component({

public/docs/_examples/style-guide/ts/07-03/app/heroes/shared/hero.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { Injectable } from '@angular/core';
33
import { Observable } from 'rxjs/Rx';
44

5-
import { Hero } from './hero.model.ts';
5+
import { Hero } from './hero.model';
66

77
@Injectable()
88
export class HeroService {

public/docs/_examples/style-guide/ts/07-04/app/heroes/shared/hero.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { Injectable } from '@angular/core';
33
import { Observable } from 'rxjs/Rx';
44

5-
import { Hero } from './hero.model.ts';
5+
import { Hero } from './hero.model';
66

77
@Injectable()
88
export class HeroService {

public/docs/_examples/typings.json

-7
This file was deleted.

public/docs/_examples/upgrade-phonecat-1-typescript/README.md

-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ The following changes from vanilla Phonecat are applied:
1212
in index.html and karma.conf.ng1.js.
1313
* E2E tests have been moved to the parent directory, where `gulp run-e2e-tests` can
1414
discover and run them along with all the other examples.
15-
* Angular 1 typings (from DefinitelyTyped) are added to typings-ng1 so that
16-
TypeScript can recognize Angular 1 code. (typings.json comes from boilerplate
17-
so we can't add them there).
1815
* Most of the phone JSON and image data removed in the interest of keeping
1916
repo weight down. Keeping enough to retain testability of the app.
2017

0 commit comments

Comments
 (0)