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

Commit b153176

Browse files
committed
chore: update examples to @types
1 parent ab4f077 commit b153176

40 files changed

+71
-195
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ var _apiShredOptionsForDart = {
8585
logLevel: _dgeniLogLevel
8686
};
8787

88-
var _excludePatterns = ['**/node_modules/**', '**/typings/**', '**/packages/**'];
88+
var _excludePatterns = ['**/node_modules/**', '**/packages/**'];
8989

9090
var _excludeMatchers = _excludePatterns.map(function(excludePattern){
9191
return new Minimatch(excludePattern)
@@ -442,13 +442,6 @@ gulp.task('add-example-boilerplate', function(done) {
442442
fsUtils.addSymlink(realPath, linkPath);
443443
});
444444

445-
realPath = path.join(EXAMPLES_PATH, '/typings');
446-
var typingsPaths = excludeDartPaths(getTypingsPaths(EXAMPLES_PATH));
447-
typingsPaths.forEach(function(linkPath) {
448-
gutil.log("symlinking " + linkPath + ' -> ' + realPath)
449-
fsUtils.addSymlink(realPath, linkPath);
450-
});
451-
452445
return buildStyles(copyExampleBoilerplate, done);
453446
});
454447

@@ -511,11 +504,6 @@ gulp.task('remove-example-boilerplate', function() {
511504
fsUtils.removeSymlink(linkPath);
512505
});
513506

514-
var typingsPaths = getTypingsPaths(EXAMPLES_PATH);
515-
typingsPaths.forEach(function(linkPath) {
516-
fsUtils.removeSymlink(linkPath);
517-
});
518-
519507
deleteExampleBoilerPlate();
520508
});
521509

@@ -799,7 +787,7 @@ gulp.task('_harp-compile', function() {
799787

800788
gulp.task('_shred-devguide-examples', ['_shred-clean-devguide', '_copy-example-boilerplate'], function() {
801789
// Split big shredding task into partials 2016-06-14
802-
var examplePaths = globby.sync(EXAMPLES_PATH+'/*/', {ignore: ['/node_modules', 'typings/']});
790+
var examplePaths = globby.sync(EXAMPLES_PATH+'/*/', {ignore: ['/node_modules']});
803791
var promise = Promise.resolve(true);
804792
examplePaths.forEach(function (examplePath) {
805793
promise = promise.then(() => docShredder.shredSingleExampleDir(_devguideShredOptions, examplePath));
@@ -858,8 +846,6 @@ gulp.task('lint', function() {
858846
'!./public/docs/_examples/**/ts-snippets/*.ts',
859847
'!./public/docs/_examples/style-guide/ts/**/*.avoid.ts',
860848
'!./public/docs/_examples/**/node_modules/**/*',
861-
'!./public/docs/_examples/**/typings/**/*',
862-
'!./public/docs/_examples/**/typings-ng1/**/*',
863849
'!./public/docs/_examples/**/build/**/*',
864850
// temporary until codelyzer is fixed mgechev/codelyzer#60
865851
'!./public/docs/_examples/animations/ts/app/hero.service.ts'
@@ -1121,13 +1107,6 @@ function getNodeModulesPaths(basePath) {
11211107
return paths;
11221108
}
11231109

1124-
function getTypingsPaths(basePath) {
1125-
var paths = getExamplePaths(basePath).map(function(examplePath) {
1126-
return path.join(examplePath, "/typings");
1127-
});
1128-
return paths;
1129-
}
1130-
11311110
function getExamplePaths(basePath, includeBase) {
11321111
// includeBase defaults to false
11331112
return getPaths(basePath, _exampleConfigFilename, includeBase);
@@ -1262,7 +1241,7 @@ function devGuideExamplesWatch(shredOptions, postShredAction, focus) {
12621241
// removed this version because gulp.watch has the same glob issue that dgeni has.
12631242
// var excludePattern = '!' + path.join(shredOptions.examplesDir, '**/node_modules/**/*.*');
12641243
// gulp.watch([includePattern, excludePattern], {readDelay: 500}, function (event, done) {
1265-
var ignoreThese = [ '**/node_modules/**', '**/_fragments/**', '**/dist/**', '**/typings/**',
1244+
var ignoreThese = [ '**/node_modules/**', '**/_fragments/**', '**/dist/**',
12661245
'**/dart/.pub/**', '**/dart/build/**', '**/dart/packages/**'];
12671246
ignoreThese = ignoreThese.concat(_exampleBoilerplateFiles.map((file) => `public/docs/_examples/*/*/${file}`));
12681247
var files = globby.sync( [includePattern], { ignore: ignoreThese });

public/docs/_examples/.gitignore

Lines changed: 0 additions & 1 deletion
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
_test-output

public/docs/_examples/_boilerplate/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
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",

public/docs/_examples/_boilerplate/tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"removeComments": false,
1010
"noImplicitAny": true,
1111
"suppressImplicitAnyIndexErrors": true,
12-
"types": []
12+
"typeRoots": [
13+
"../../node_modules/@types/"
14+
]
1315
}
1416
}

public/docs/_examples/cb-aot-compiler/ts/tsconfig-aot.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@
88
"experimentalDecorators": true,
99
"removeComments": false,
1010
"noImplicitAny": true,
11-
"suppressImplicitAnyIndexErrors": true,
12-
"types": []
11+
"suppressImplicitAnyIndexErrors": true
1312
},
1413

1514
"files": [
1615
"app/app.module.ts",
17-
"app/main.ts",
18-
"./typings/index.d.ts"
16+
"app/main.ts"
1917
],
2018

2119
"angularCompilerOptions": {

public/docs/_examples/cb-visual-studio-2015/ts/tsconfig.json

Lines changed: 4 additions & 1 deletion
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
"compileOnSave": true
1417
}

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

Lines changed: 0 additions & 1 deletion
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
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
/// <reference path="../typings/index.d.ts" />

public/docs/_examples/package.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"version": "1.0.0",
44
"description": "Master package.json, the superset of all dependencies for all of the _example package.json files. See _boilerplate/package.json for example npm scripts.",
55
"scripts": {
6-
"postinstall": "typings install",
7-
"typings": "typings",
86
"protractor": "protractor",
97
"webdriver:update": "webdriver-manager update"
108
},
@@ -42,8 +40,16 @@
4240
"zone.js": "^0.6.25"
4341
},
4442
"devDependencies": {
45-
"@types/angular": "^1.5.15",
46-
"@types/jasmine": "^2.2.34",
43+
"@types/angular": "^1.5.16",
44+
"@types/angular-animate": "^1.5.5",
45+
"@types/angular-cookies": "^1.4.2",
46+
"@types/angular-mocks": "^1.5.5",
47+
"@types/angular-resource": "^1.5.6",
48+
"@types/angular-route": "^1.3.2",
49+
"@types/angular-sanitize": "^1.3.3",
50+
"@types/core-js": "^0.9.34",
51+
"@types/jasmine": "^2.5.35",
52+
"@types/node": "^6.0.45",
4753
"@types/selenium-webdriver": "^2.53.32",
4854
"angular2-template-loader": "^0.4.0",
4955
"awesome-typescript-loader": "^2.2.4",
@@ -75,11 +81,9 @@
7581
"rimraf": "^2.5.4",
7682
"rollup-plugin-commonjs": "^4.1.0",
7783
"style-loader": "^0.13.1",
78-
"ts-loader": "^0.8.2",
7984
"ts-node": "^1.3.0",
8085
"tslint": "^3.15.1",
8186
"typescript": "^2.0.3",
82-
"typings": "^1.4.0",
8387
"webpack": "^1.13.0",
8488
"webpack-dev-server": "^1.14.1",
8589
"webpack-merge": "^0.14.0"

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
"scripts": {
55
"start": "tsc && concurrently \"tsc -w\" \"lite-server\" ",
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
"licenses": [
1311
{
@@ -35,9 +33,10 @@
3533
"zone.js": "^0.6.25"
3634
},
3735
"devDependencies": {
36+
"@types/core-js": "^0.9.34",
37+
"@types/node": "^6.0.45",
3838
"concurrently": "^3.0.0",
3939
"lite-server": "^2.2.2",
40-
"typescript": "^2.0.3",
41-
"typings":"^1.4.0"
40+
"typescript": "^2.0.3"
4241
}
4342
}

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

Lines changed: 0 additions & 7 deletions
This file was deleted.

public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// #docregion import-adapter
22
import { UpgradeAdapter } from '@angular/upgrade';
3+
import * as angular from 'angular';
34

45
import { AppModule } from './app.module';
56
// #enddocregion import-adapter

public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-detail/phone-detail.component.ng1.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// #docregion
22
import { Phone, PhoneData } from '../core/phone/phone.service';
3+
import * as angular from 'angular';
34

45
class PhoneDetailController {
56
phone: PhoneData;

public/docs/_examples/upgrade-phonecat-2-hybrid/ts/app/phone-list/phone-list.component.ng1.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// #docregion
22
import { Phone, PhoneData } from '../core/phone/phone.service';
3+
import * as angular from 'angular';
34

45
class PhoneListController {
56
phones: PhoneData[];

public/docs/_examples/webpack/ts/package.webpack.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"scripts": {
66
"start": "webpack-dev-server --inline --progress --port 8080",
77
"test": "karma start",
8-
"build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail",
9-
"postinstall": "typings install"
8+
"build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail"
109
},
1110
"licenses": [
1211
{
@@ -28,6 +27,9 @@
2827
"zone.js": "^0.6.23"
2928
},
3029
"devDependencies": {
30+
"@types/core-js": "^0.9.34",
31+
"@types/node": "^6.0.45",
32+
"@types/jasmine": "^2.5.35",
3133
"angular2-template-loader": "^0.4.0",
3234
"awesome-typescript-loader": "^2.2.4",
3335
"css-loader": "^0.23.1",
@@ -47,7 +49,6 @@
4749
"rimraf": "^2.5.2",
4850
"style-loader": "^0.13.1",
4951
"typescript": "^2.0.2",
50-
"typings": "^1.3.2",
5152
"webpack": "^1.13.0",
5253
"webpack-dev-server": "^1.14.1",
5354
"webpack-merge": "^0.14.0"

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

Lines changed: 0 additions & 7 deletions
This file was deleted.

public/docs/js/latest/guide/forms.jade

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,11 +624,9 @@ figure.image-display
624624
.file hero-form.component.js
625625
.file main.ts
626626
.file node_modules ...
627-
.file typings ...
628627
.file index.html
629628
.file package.json
630629
.file tsconfig.json
631-
.file typings.json
632630
:marked
633631
Here’s the final version of the source:
634632

public/docs/ts/_cache/quickstart.jade

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -581,13 +581,11 @@ block project-file-structure
581581
.file app.module.ts
582582
.file main.ts
583583
.file node_modules ...
584-
.file typings ...
585584
.file index.html
586585
.file package.json
587586
.file styles.css
588587
.file systemjs.config.js
589588
.file tsconfig.json
590-
.file typings.json
591589
:marked
592590
Here are the file contents:
593591

@@ -599,7 +597,6 @@ block project-files
599597
quickstart/ts/index.html,
600598
quickstart/ts/package.1.json,
601599
quickstart/ts/tsconfig.1.json,
602-
quickstart/ts/typings.1.json,
603600
quickstart/ts/styles.css,
604601
quickstart/ts/systemjs.config.1.js`
605602
,
@@ -610,7 +607,6 @@ block project-files
610607
index.html,
611608
package.json,
612609
tsconfig.json,
613-
typings.json,
614610
styles.css (excerpt),
615611
systemjs.config.js`)
616612

public/docs/ts/_cache/tutorial/toh-pt5.jade

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,11 @@ block intro-file-tree
6464
.file main.ts
6565
.file mock-heroes.ts
6666
.file node_modules ...
67-
.file typings ...
6867
.file index.html
6968
.file package.json
7069
.file styles.css
7170
.file systemjs.config.js
7271
.file tsconfig.json
73-
.file typings.json
7472

7573
block keep-app-running
7674
:marked
@@ -883,13 +881,11 @@ block file-tree-end
883881
.file main.ts
884882
.file mock-heroes.ts
885883
.file node_modules ...
886-
.file typings ...
887884
.file index.html
888885
.file package.json
889886
.file styles.css
890887
.file systemjs.config.js
891888
.file tsconfig.json
892-
.file typings.json
893889

894890
.l-main-section
895891
:marked

public/docs/ts/_cache/tutorial/toh-pt6.jade

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,13 +559,11 @@ block filetree
559559
.file main.ts
560560
.file in-memory-data.service.ts (new)
561561
.file node_modules ...
562-
.file typings ...
563562
.file index.html
564563
.file package.json
565564
.file styles.css
566565
.file systemjs.config.js
567566
.file tsconfig.json
568-
.file typings.json
569567

570568
.l-main-section
571569
:marked

public/docs/ts/latest/cookbook/visual-studio-2015.jade

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ h2#copy Step 4: Copy the QuickStart files into the ASP.NET project folder
8888
* index.html
8989
* package.json
9090
* tsconfig.json
91-
* typings.json
9291

9392
.l-main-section
9493
h2#restore Step 5: Restore the required packages

public/docs/ts/latest/guide/forms.jade

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,12 +705,10 @@ figure.image-display
705705
.file hero-form.component.html
706706
.file hero-form.component.ts
707707
.file main.ts
708-
.file node_modules ...
709-
.file typings ...
708+
.file node_modules ...
710709
.file index.html
711710
.file package.json
712711
.file tsconfig.json
713-
.file typings.json
714712
:marked
715713
Here’s the final version of the source:
716714

0 commit comments

Comments
 (0)