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

Commit 305ff88

Browse files
committed
chore: update to typescript 2.0
1 parent 5da6dff commit 305ff88

Some content is hidden

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

61 files changed

+37
-12573
lines changed

gulpfile.js

+3-25
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ var _apiShredOptions = {
6969
logLevel: _dgeniLogLevel
7070
};
7171

72-
var _excludePatterns = ['**/node_modules/**', '**/typings/**', '**/packages/**'];
72+
var _excludePatterns = ['**/node_modules/**', '**/packages/**'];
7373

7474
var _excludeMatchers = _excludePatterns.map(function(excludePattern){
7575
return new Minimatch(excludePattern)
@@ -84,7 +84,6 @@ var _exampleBoilerplateFiles = [
8484
'systemjs.config.js',
8585
'tsconfig.json',
8686
'tslint.json',
87-
'typings.json',
8887
'wallaby.js'
8988
];
9089

@@ -390,13 +389,6 @@ gulp.task('add-example-boilerplate', function() {
390389
fsUtils.addSymlink(realPath, linkPath);
391390
});
392391

393-
realPath = path.join(EXAMPLES_PATH, '/typings');
394-
var typingsPaths = excludeDartPaths(getTypingsPaths(EXAMPLES_PATH));
395-
typingsPaths.forEach(function(linkPath) {
396-
gutil.log("symlinking " + linkPath + ' -> ' + realPath)
397-
fsUtils.addSymlink(realPath, linkPath);
398-
});
399-
400392
return copyExampleBoilerplate();
401393
});
402394

@@ -443,11 +435,6 @@ gulp.task('remove-example-boilerplate', function() {
443435
fsUtils.removeSymlink(linkPath);
444436
});
445437

446-
var typingsPaths = getTypingsPaths(EXAMPLES_PATH);
447-
typingsPaths.forEach(function(linkPath) {
448-
fsUtils.removeSymlink(linkPath);
449-
});
450-
451438
deleteExampleBoilerPlate();
452439
});
453440

@@ -632,7 +619,7 @@ gulp.task('_harp-compile', function() {
632619

633620
gulp.task('_shred-devguide-examples', ['_shred-clean-devguide', '_copy-example-boilerplate'], function() {
634621
// Split big shredding task into partials 2016-06-14
635-
var examplePaths = globby.sync(EXAMPLES_PATH+'/*/', {ignore: ['/node_modules', 'typings/', '_protractor/']});
622+
var examplePaths = globby.sync(EXAMPLES_PATH+'/*/', {ignore: ['/node_modules', '_protractor/']});
636623
var promise = Promise.resolve(true);
637624
examplePaths.forEach(function (examplePath) {
638625
promise = promise.then(() => docShredder.shredSingleExampleDir(_devguideShredOptions, examplePath));
@@ -685,8 +672,6 @@ gulp.task('lint', function() {
685672
'!./public/docs/_examples/style-guide/ts/**/*.avoid.ts',
686673
'!./public/docs/_examples/**/node_modules/**/*',
687674
'!./public/docs/_examples/_protractor/**/*',
688-
'!./public/docs/_examples/**/typings/**/*',
689-
'!./public/docs/_examples/**/typings-ng1/**/*',
690675
'!./public/docs/_examples/**/build/**/*',
691676
// temporary until codelyzer is fixed mgechev/codelyzer#60
692677
'!./public/docs/_examples/animations/ts/app/hero.service.ts'
@@ -874,13 +859,6 @@ function getNodeModulesPaths(basePath) {
874859
return paths;
875860
}
876861

877-
function getTypingsPaths(basePath) {
878-
var paths = getExamplePaths(basePath).map(function(examplePath) {
879-
return path.join(examplePath, "/typings");
880-
});
881-
return paths;
882-
}
883-
884862
function getExamplePaths(basePath, includeBase) {
885863
// includeBase defaults to false
886864
return getPaths(basePath, _exampleConfigFilename, includeBase)
@@ -1000,7 +978,7 @@ function devGuideExamplesWatch(shredOptions, postShredAction) {
1000978
// removed this version because gulp.watch has the same glob issue that dgeni has.
1001979
// var excludePattern = '!' + path.join(shredOptions.examplesDir, '**/node_modules/**/*.*');
1002980
// gulp.watch([includePattern, excludePattern], {readDelay: 500}, function (event, done) {
1003-
var ignoreThese = [ '**/node_modules/**', '**/_fragments/**', '**/dist/**', '**/typings/**',
981+
var ignoreThese = [ '**/node_modules/**', '**/_fragments/**', '**/dist/**',
1004982
'**/dart/.pub/**', '**/dart/build/**', '**/dart/packages/**'];
1005983
ignoreThese = ignoreThese.concat(_exampleBoilerplateFiles.map((file) => `public/docs/_examples/*/*/${file}`));
1006984
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

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
"version": "1.0.0",
44
"description": "Manage _protractor folder installations",
55
"scripts": {
6-
"postinstall": "typings install",
7-
"typings": "typings",
86
"protractor": "protractor",
97
"webdriver:update": "webdriver-manager update"
108
},
119
"keywords": [],
1210
"author": "",
1311
"license": "ISC",
1412
"devDependencies": {
15-
"protractor": "^3.3.0",
16-
"typings": "^1.0.4"
13+
"@types/jasmine": "^2.2.28-alpha",
14+
"@types/node": "^4.0.28-alpha",
15+
"@types/protractor": "^1.5.15-alpha",
16+
"protractor": "^3.3.0"
1717
},
1818
"repository": {}
1919
}

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

+5-5
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.12"
4543
},
4644
"devDependencies": {
47-
"angular-cli": "^1.0.0-beta.5",
45+
"@types/angular": "^1.5.7",
46+
"@types/core-js": "^0.9.27-alpha",
47+
"@types/jasmine": "^2.2.28-alpha",
48+
"@types/node": "^4.0.28-alpha",
4849
"angular2-template-loader": "^0.4.0",
4950
"canonical-path": "0.0.2",
5051
"concurrently": "^2.1.0",
@@ -73,8 +74,7 @@
7374
"style-loader": "^0.13.1",
7475
"ts-loader": "^0.8.2",
7576
"ts-node": "^0.7.3",
76-
"typescript": "^1.8.10",
77-
"typings": "^1.0.4",
77+
"typescript": "^2.0.0",
7878
"webpack": "^1.13.0",
7979
"webpack-dev-server": "^1.14.1",
8080
"webpack-merge": "^0.14.0"

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

+2-5
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": {
@@ -34,7 +32,6 @@
3432
"devDependencies": {
3533
"concurrently": "^2.0.0",
3634
"lite-server": "^2.2.0",
37-
"typescript": "^1.8.10",
38-
"typings":"^1.0.4"
35+
"typescript": "^1.8.10"
3936
}
4037
}

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

-7
This file was deleted.

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)