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

chore: update to @types #1872

Merged
merged 3 commits into from
Oct 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ node_modules
_temp
bower_components
jspm_packages
typings
**/packages
build
pubspec.lock
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ take the following extra steps to prepare the environment:
1. cd back up to `angular.io` root: `cd ../../..`

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

Now cd into any particular sample's language directory (e.g., `public/docs/_examples/quickstart/ts`) and try:
- `npm start` to simultaneously compile-with-watch and serve-in-browser-with-watch
Expand Down
27 changes: 3 additions & 24 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ var _apiShredOptionsForDart = {
logLevel: _dgeniLogLevel
};

var _excludePatterns = ['**/node_modules/**', '**/typings/**', '**/packages/**'];
var _excludePatterns = ['**/node_modules/**', '**/packages/**'];

var _excludeMatchers = _excludePatterns.map(function(excludePattern){
return new Minimatch(excludePattern)
Expand Down Expand Up @@ -461,13 +461,6 @@ gulp.task('add-example-boilerplate', function(done) {
fsUtils.addSymlink(realPath, linkPath);
});

realPath = path.join(EXAMPLES_PATH, '/typings');
var typingsPaths = excludeDartPaths(getTypingsPaths(EXAMPLES_PATH));
typingsPaths.forEach(function(linkPath) {
gutil.log("symlinking " + linkPath + ' -> ' + realPath)
fsUtils.addSymlink(realPath, linkPath);
});

return buildStyles(copyExampleBoilerplate, done);
});

Expand Down Expand Up @@ -530,11 +523,6 @@ gulp.task('remove-example-boilerplate', function() {
fsUtils.removeSymlink(linkPath);
});

var typingsPaths = getTypingsPaths(EXAMPLES_PATH);
typingsPaths.forEach(function(linkPath) {
fsUtils.removeSymlink(linkPath);
});

deleteExampleBoilerPlate();
});

Expand Down Expand Up @@ -818,7 +806,7 @@ gulp.task('_harp-compile', function() {

gulp.task('_shred-devguide-examples', ['_shred-clean-devguide', '_copy-example-boilerplate'], function() {
// Split big shredding task into partials 2016-06-14
var examplePaths = globby.sync(EXAMPLES_PATH+'/*/', {ignore: ['/node_modules', 'typings/']});
var examplePaths = globby.sync(EXAMPLES_PATH+'/*/', {ignore: ['/node_modules']});
var promise = Promise.resolve(true);
examplePaths.forEach(function (examplePath) {
promise = promise.then(() => docShredder.shredSingleExampleDir(_devguideShredOptions, examplePath));
Expand Down Expand Up @@ -877,8 +865,6 @@ gulp.task('lint', function() {
'!./public/docs/_examples/**/ts-snippets/*.ts',
'!./public/docs/_examples/style-guide/ts/**/*.avoid.ts',
'!./public/docs/_examples/**/node_modules/**/*',
'!./public/docs/_examples/**/typings/**/*',
'!./public/docs/_examples/**/typings-ng1/**/*',
'!./public/docs/_examples/**/build/**/*',
// temporary until codelyzer is fixed mgechev/codelyzer#60
'!./public/docs/_examples/animations/ts/app/hero.service.ts'
Expand Down Expand Up @@ -1140,13 +1126,6 @@ function getNodeModulesPaths(basePath) {
return paths;
}

function getTypingsPaths(basePath) {
var paths = getExamplePaths(basePath).map(function(examplePath) {
return path.join(examplePath, "/typings");
});
return paths;
}

function getExamplePaths(basePath, includeBase) {
// includeBase defaults to false
return getPaths(basePath, _exampleConfigFilename, includeBase);
Expand Down Expand Up @@ -1281,7 +1260,7 @@ function devGuideExamplesWatch(shredOptions, postShredAction, focus) {
// removed this version because gulp.watch has the same glob issue that dgeni has.
// var excludePattern = '!' + path.join(shredOptions.examplesDir, '**/node_modules/**/*.*');
// gulp.watch([includePattern, excludePattern], {readDelay: 500}, function (event, done) {
var ignoreThese = [ '**/node_modules/**', '**/_fragments/**', '**/dist/**', '**/typings/**',
var ignoreThese = [ '**/node_modules/**', '**/_fragments/**', '**/dist/**',
'**/dart/.pub/**', '**/dart/build/**', '**/dart/packages/**'];
ignoreThese = ignoreThese.concat(_exampleBoilerplateFiles.map((file) => `public/docs/_examples/*/*/${file}`));
var files = globby.sync( [includePattern], { ignore: ignoreThese });
Expand Down
1 change: 0 additions & 1 deletion public/docs/_examples/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package.json
systemjs.config.js
tsconfig.json
tslint.json
typings.json
wallaby.js

_test-output
Expand Down
1 change: 0 additions & 1 deletion public/docs/_examples/_boilerplate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"http-server:cli": "http-server dist/",
"lite": "lite-server",
"lite:aot": "lite-server -c aot/bs-config.json",
"postinstall": "typings install",
"test": "tsc && concurrently \"tsc -w\" \"karma start karma.conf.js\"",
"tsc": "tsc",
"tsc:w": "tsc -w",
Expand Down
4 changes: 3 additions & 1 deletion public/docs/_examples/_boilerplate/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"removeComments": false,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"types": []
"typeRoots": [
"../../node_modules/@types/"
]
},
"exclude": [
"node_modules/*",
Expand Down
6 changes: 2 additions & 4 deletions public/docs/_examples/cb-aot-compiler/ts/tsconfig-aot.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"types": []
"suppressImplicitAnyIndexErrors": true
},

"files": [
"app/app.module.ts",
"app/main.ts",
"./typings/index.d.ts"
"app/main.ts"
],

"angularCompilerOptions": {
Expand Down
5 changes: 4 additions & 1 deletion public/docs/_examples/cb-visual-studio-2015/ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"node_modules/@types"
]
},
"compileOnSave": true
}
1 change: 0 additions & 1 deletion public/docs/_examples/cli-quickstart/ts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
/libpeerconnection.log
npm-debug.log
testem.log
/typings

# e2e
/e2e/*.js
Expand Down
1 change: 0 additions & 1 deletion public/docs/_examples/cli-quickstart/ts/src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
/// <reference path="../typings/index.d.ts" />
16 changes: 10 additions & 6 deletions public/docs/_examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"version": "1.0.0",
"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.",
"scripts": {
"postinstall": "typings install",
"typings": "typings",
"protractor": "protractor",
"webdriver:update": "webdriver-manager update"
},
Expand Down Expand Up @@ -42,8 +40,16 @@
"zone.js": "^0.6.25"
},
"devDependencies": {
"@types/angular": "^1.5.15",
"@types/jasmine": "^2.2.34",
"@types/angular": "^1.5.16",
"@types/angular-animate": "^1.5.5",
"@types/angular-cookies": "^1.4.2",
"@types/angular-mocks": "^1.5.5",
"@types/angular-resource": "^1.5.6",
"@types/angular-route": "^1.3.2",
"@types/angular-sanitize": "^1.3.3",
"@types/core-js": "^0.9.34",
"@types/jasmine": "^2.5.35",
"@types/node": "^6.0.45",
"@types/selenium-webdriver": "^2.53.32",
"angular2-template-loader": "^0.4.0",
"awesome-typescript-loader": "^2.2.4",
Expand Down Expand Up @@ -76,11 +82,9 @@
"rollup-plugin-commonjs": "^4.1.0",
"source-map-explorer": "^1.3.2",
"style-loader": "^0.13.1",
"ts-loader": "^0.8.2",
"ts-node": "^1.3.0",
"tslint": "^3.15.1",
"typescript": "^2.0.3",
"typings": "^1.4.0",
"webpack": "^1.13.0",
"webpack-dev-server": "^1.14.1",
"webpack-merge": "^0.14.0"
Expand Down
9 changes: 4 additions & 5 deletions public/docs/_examples/quickstart/ts/package.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
"scripts": {
"start": "tsc && concurrently \"tsc -w\" \"lite-server\" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings"
"tsc:w": "tsc -w"
},
"licenses": [
{
Expand Down Expand Up @@ -35,9 +33,10 @@
"zone.js": "^0.6.25"
},
"devDependencies": {
"@types/core-js": "^0.9.34",
"@types/node": "^6.0.45",
"concurrently": "^3.0.0",
"lite-server": "^2.2.2",
"typescript": "^2.0.3",
"typings":"^1.4.0"
"typescript": "^2.0.3"
}
}
7 changes: 0 additions & 7 deletions public/docs/_examples/quickstart/ts/typings.1.json

This file was deleted.

7 changes: 4 additions & 3 deletions public/docs/_examples/toh-6/ts/tsconfig-aot.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
"removeComments": false,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"types": []
"typeRoots": [
"../../node_modules/@types/"
]
},

"files": [
"app/app.module.ts",
"app/main-aot.ts",
"typings/index.d.ts"
"app/main-aot.ts"
],

"angularCompilerOptions": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// #docregion import-adapter
import { UpgradeAdapter } from '@angular/upgrade';
declare var angular: any;

import { AppModule } from './app.module';
// #enddocregion import-adapter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// #docregion
import { Phone, PhoneData } from '../core/phone/phone.service';
declare var angular: any;

class PhoneDetailController {
phone: PhoneData;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// #docregion
import { Phone, PhoneData } from '../core/phone/phone.service';
declare var angular: any;

class PhoneListController {
phones: PhoneData[];
Expand Down
7 changes: 4 additions & 3 deletions public/docs/_examples/webpack/ts/package.webpack.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"scripts": {
"start": "webpack-dev-server --inline --progress --port 8080",
"test": "karma start",
"build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail",
"postinstall": "typings install"
"build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail"
},
"licenses": [
{
Expand All @@ -28,6 +27,9 @@
"zone.js": "^0.6.25"
},
"devDependencies": {
"@types/core-js": "^0.9.34",
"@types/node": "^6.0.45",
"@types/jasmine": "^2.5.35",
"angular2-template-loader": "^0.4.0",
"awesome-typescript-loader": "^2.2.4",
"css-loader": "^0.23.1",
Expand All @@ -47,7 +49,6 @@
"rimraf": "^2.5.2",
"style-loader": "^0.13.1",
"typescript": "^2.0.2",
"typings": "^1.3.2",
"webpack": "^1.13.0",
"webpack-dev-server": "^1.14.1",
"webpack-merge": "^0.14.0"
Expand Down
7 changes: 0 additions & 7 deletions public/docs/_examples/webpack/ts/typings.1.json

This file was deleted.

2 changes: 0 additions & 2 deletions public/docs/js/latest/guide/forms.jade
Original file line number Diff line number Diff line change
Expand Up @@ -624,11 +624,9 @@ figure.image-display
.file hero-form.component.js
.file main.ts
.file node_modules ...
.file typings ...
.file index.html
.file package.json
.file tsconfig.json
.file typings.json
:marked
Here’s the final version of the source:

Expand Down
4 changes: 0 additions & 4 deletions public/docs/ts/_cache/quickstart.jade
Original file line number Diff line number Diff line change
Expand Up @@ -581,13 +581,11 @@ block project-file-structure
.file app.module.ts
.file main.ts
.file node_modules ...
.file typings ...
.file index.html
.file package.json
.file styles.css
.file systemjs.config.js
.file tsconfig.json
.file typings.json
:marked
Here are the file contents:

Expand All @@ -599,7 +597,6 @@ block project-files
quickstart/ts/index.html,
quickstart/ts/package.1.json,
quickstart/ts/tsconfig.1.json,
quickstart/ts/typings.1.json,
quickstart/ts/styles.css,
quickstart/ts/systemjs.config.1.js`
,
Expand All @@ -610,7 +607,6 @@ block project-files
index.html,
package.json,
tsconfig.json,
typings.json,
styles.css (excerpt),
systemjs.config.js`)

Expand Down
4 changes: 0 additions & 4 deletions public/docs/ts/_cache/tutorial/toh-pt5.jade
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ block intro-file-tree
.file main.ts
.file mock-heroes.ts
.file node_modules ...
.file typings ...
.file index.html
.file package.json
.file styles.css
.file systemjs.config.js
.file tsconfig.json
.file typings.json

block keep-app-running
:marked
Expand Down Expand Up @@ -883,13 +881,11 @@ block file-tree-end
.file main.ts
.file mock-heroes.ts
.file node_modules ...
.file typings ...
.file index.html
.file package.json
.file styles.css
.file systemjs.config.js
.file tsconfig.json
.file typings.json

.l-main-section
:marked
Expand Down
2 changes: 0 additions & 2 deletions public/docs/ts/_cache/tutorial/toh-pt6.jade
Original file line number Diff line number Diff line change
Expand Up @@ -559,13 +559,11 @@ block filetree
.file main.ts
.file in-memory-data.service.ts (new)
.file node_modules ...
.file typings ...
.file index.html
.file package.json
.file styles.css
.file systemjs.config.js
.file tsconfig.json
.file typings.json

.l-main-section
:marked
Expand Down
1 change: 0 additions & 1 deletion public/docs/ts/latest/cookbook/visual-studio-2015.jade
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ h2#copy Step 4: Copy the QuickStart files into the ASP.NET project folder
* index.html
* package.json
* tsconfig.json
* typings.json

.l-main-section
h2#restore Step 5: Restore the required packages
Expand Down
Loading