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

Commit 50ae0ef

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

40 files changed

+75
-196
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

0 commit comments

Comments
 (0)