refactor: update paths from modules/@angular to packages

This commit is contained in:
Jason Aden 2017-03-07 11:04:30 -08:00
parent da8ea350b2
commit b74ab83d2c
53 changed files with 232 additions and 104 deletions

View File

@ -87,7 +87,7 @@ groups:
core:
conditions:
files:
- "modules/@angular/core/*"
- "packages/core/*"
users:
- tbosch #primary
- mhevery
@ -97,7 +97,7 @@ groups:
compiler/animations:
conditions:
files:
- "modules/@angular/compiler/src/animation/*"
- "packages/compiler/src/animation/*"
users:
- matsko #primary
- tbosch
@ -107,7 +107,7 @@ groups:
compiler/i18n:
conditions:
files:
- "modules/@angular/compiler/src/i18n/*"
- "packages/compiler/src/i18n/*"
users:
- vicb #primary
- tbosch
@ -117,7 +117,7 @@ groups:
compiler:
conditions:
files:
- "modules/@angular/compiler/*"
- "packages/compiler/*"
users:
- tbosch #primary
- vicb
@ -129,7 +129,7 @@ groups:
conditions:
files:
- "tools/@angular/tsc-wrapped/*"
- "modules/@angular/compiler-cli/*"
- "packages/compiler-cli/*"
users:
- alexeagle
- chuckjaz
@ -140,7 +140,7 @@ groups:
common:
conditions:
files:
- "modules/@angular/common/*"
- "packages/common/*"
users:
- pkozlowski-opensource #primary
- vicb
@ -150,7 +150,7 @@ groups:
forms:
conditions:
files:
- "modules/@angular/forms/*"
- "packages/forms/*"
users:
- kara #primary
# needs secondary
@ -160,7 +160,7 @@ groups:
http:
conditions:
files:
- "modules/@angular/http/*"
- "packages/http/*"
users:
- vikerman #primary
- alxhub
@ -170,7 +170,7 @@ groups:
language-service:
conditions:
files:
- "modules/@angular/language-service/*"
- "packages/language-service/*"
users:
- chuckjaz #primary
# needs secondary
@ -180,7 +180,7 @@ groups:
router:
conditions:
files:
- "modules/@angular/router/*"
- "packages/router/*"
users:
- vicb #primary
# needs secondary
@ -190,7 +190,7 @@ groups:
upgrade:
conditions:
files:
- "modules/@angular/upgrade/*"
- "packages/upgrade/*"
users:
- petebacondarwin #primary
- gkalpak
@ -200,7 +200,7 @@ groups:
platform-browser:
conditions:
files:
- "modules/@angular/platform-browser/*"
- "packages/platform-browser/*"
users:
- tbosch #primary
- vicb #secondary
@ -210,7 +210,7 @@ groups:
platform-server:
conditions:
files:
- "modules/@angular/platform-server/*"
- "packages/platform-server/*"
users:
- vikerman #primary
- alxhub
@ -222,7 +222,7 @@ groups:
platform-webworker:
conditions:
files:
- "modules/@angular/platform-webworker/*"
- "packages/platform-webworker/*"
users:
- vicb #primary
- tbosch #secondary
@ -234,7 +234,7 @@ groups:
benchpress:
conditions:
files:
- "modules/@angular/benchpress/*"
- "packages/benchpress/*"
users:
- tbosch #primary
# needs secondary

View File

@ -2020,7 +2020,7 @@ prefix using `animate-` must now be preixed using `bind-animate-`.
### ROUTER CHANGE LOG
[You can find the router changelog here.](https://github.com/angular/angular/blob/master/modules/@angular/router/CHANGELOG.md)
[You can find the router changelog here.](https://github.com/angular/angular/blob/master/packages/router/CHANGELOG.md)
<a name="2.0.0-rc.4"></a>
# [2.0.0-rc.4](https://github.com/angular/angular/compare/2.0.0-rc.3...2.0.0-rc.4) (2016-06-30)

View File

@ -416,14 +416,14 @@ can be found in the LICENSE file at http://angular.io/license
<router-outlet></router-outlet>
<!--
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->"><input type="hidden" name="files[app/banner.component.html]" value="<h1>{{title}}</h1>
<!--
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
@ -432,7 +432,7 @@ can be found in the LICENSE file at http://angular.io/license
</div>
<!--
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
@ -445,7 +445,7 @@ can be found in the LICENSE file at http://angular.io/license
</div>
<!--
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
@ -462,7 +462,7 @@ can be found in the LICENSE file at http://angular.io/license
</div>
<!--
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
@ -476,7 +476,7 @@ can be found in the LICENSE file at http://angular.io/license
</ul>
<!--
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
@ -548,7 +548,7 @@ Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/"><input type="hidden" name="files[app/app.component.router.spec.ts]" value="// For more examples:
// https://github.com/angular/angular/blob/master/modules/@angular/router/test/integration.spec.ts
// https://github.com/angular/angular/blob/master/packages/router/test/integration.spec.ts
import { async, ComponentFixture, fakeAsync, TestBed, tick,
} from '@angular/core/testing';
@ -3296,7 +3296,7 @@ can be found in the LICENSE file at http://angular.io/license
</html>
<!--
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
@ -3375,4 +3375,4 @@ Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/
"></form><script>document.getElementById("mainForm").submit();</script></body></html>
"></form><script>document.getElementById("mainForm").submit();</script></body></html>

View File

@ -1,5 +1,5 @@
// For more examples:
// https://github.com/angular/angular/blob/master/modules/@angular/router/test/integration.spec.ts
// https://github.com/angular/angular/blob/master/packages/router/test/integration.spec.ts
import { async, ComponentFixture, fakeAsync, TestBed, tick,
} from '@angular/core/testing';

View File

@ -43,7 +43,7 @@ See the `package.json` of the test(s) you're debugging, to see which dist/ folde
Then run the right `tsc --watch` command to keep those dist folders up-to-date, for example:
```
$ ./node_modules/.bin/tsc -p modules/@angular/core/tsconfig-build.json --watch
$ ./node_modules/.bin/tsc -p packages/core/tsconfig-build.json --watch
```
Now you can run the integration test, it will re-install from the dist/ folder on each run.

View File

@ -42,13 +42,9 @@ module.exports = function(config) {
'tools/build/file2modulename.js',
'test-main.js',
{pattern: 'dist/all/empty.*', included: false, watched: false},
{pattern: 'packages/platform-browser/test/static_assets/**', included: false, watched: false},
{
pattern: 'modules/@angular/platform-browser/test/static_assets/**',
included: false,
watched: false
},
{
pattern: 'modules/@angular/platform-browser/test/browser/static_assets/**',
pattern: 'packages/platform-browser/test/browser/static_assets/**',
included: false,
watched: false,
}

12
modules/empty.ts Normal file
View File

@ -0,0 +1,12 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// This file intentionally left blank. It is used to load nothing in some cases.
// Such as parse5/index is redirected here instead of loading into browser.
export let __empty__: any;

65
modules/es6-subset.d.ts vendored Normal file
View File

@ -0,0 +1,65 @@
/**
* Subset of lib.es2015.core.d.ts typings.
* Angular should not require use of ES6 runtime but some API usages are already present.
* See https://github.com/angular/angular/issues/5242
* TODO(alexeagle): remove methods below which may not be present in targeted browser
*/
interface String {
/**
* Returns true if the sequence of elements of searchString converted to a String is the
* same as the corresponding elements of this object (converted to a String) starting at
* position. Otherwise returns false.
*/
startsWith(searchString: string, position?: number): boolean;
/**
* Returns true if the sequence of elements of searchString converted to a String is the
* same as the corresponding elements of this object (converted to a String) starting at
* endPosition length(this). Otherwise returns false.
*/
endsWith(searchString: string, endPosition?: number): boolean;
}
interface Array<T> {
/**
* Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
* @param predicate find calls predicate once for each element of the array, in ascending
* order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
* @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
* @param start index to start filling the array at. If start is negative, it is treated as
* length+start where length is the length of the array.
* @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
fill(value: T, start?: number, end?: number): T[];
}
interface NumberConstructor {
/**
* Returns true if the value passed is an integer, false otherwise.
* @param number A numeric value.
*/
isInteger(number: number): boolean;
}
// Workaround https://github.com/Microsoft/TypeScript/issues/9193
interface PromiseConstructor {
all<T>(values: (T|PromiseLike<T>)[]): Promise<T[]>;
}
interface Function {
/**
* Returns the name of the function. Function names are read-only and can not be changed.
*/
readonly name: string;
}

4
modules/system.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
/**
* Dummy typings for systemjs.
*/
declare var System: any;

36
modules/tsconfig.json Normal file
View File

@ -0,0 +1,36 @@
{
"compilerOptions": {
"baseUrl": ".",
"declaration": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": "../dist/all/",
"noImplicitAny": true,
"noFallthroughCasesInSwitch": true,
"paths": {
"selenium-webdriver": ["../node_modules/@types/selenium-webdriver/index.d.ts"],
"rxjs/*": ["../node_modules/rxjs/*"],
"@angular/*": ["../dist/all/@angular/*"],
"@angular/tsc-wrapped": ["../dist/tools/@angular/tsc-wrapped"],
"@angular/tsc-wrapped/*": ["../dist/tools/@angular/tsc-wrapped/*"]
},
"rootDir": ".",
"inlineSourceMap": true,
"lib": ["es5", "dom", "es2015.promise", "es2015.collection", "es2015.iterable"],
"skipDefaultLibCheck": true,
"skipLibCheck": true,
"target": "es5",
"types": ["angularjs"]
},
"exclude": [
"angular1_router",
"benchmarks/e2e_test/old",
"benchmarks/src/old",
"benchmarks/src/**/index_aot.ts",
"benchmarks_external",
"payload_tests",
"rollup-test"
]
}

17
modules/types.d.ts vendored Normal file
View File

@ -0,0 +1,17 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// This file contains all ambient imports needed to compile the modules/ source code
/// <reference path="../node_modules/zone.js/dist/zone.js.d.ts" />
/// <reference path="../node_modules/@types/hammerjs/index.d.ts" />
/// <reference path="../node_modules/@types/jasmine/index.d.ts" />
/// <reference path="../node_modules/@types/node/index.d.ts" />
/// <reference path="../node_modules/@types/selenium-webdriver/index.d.ts" />
/// <reference path="./es6-subset.d.ts" />
/// <reference path="./system.d.ts" />

View File

@ -27,5 +27,5 @@
"bugs": {
"url": "https://github.com/angular/angular/issues"
},
"homepage": "https://github.com/angular/angular/tree/master/modules/@angular/compiler-cli"
"homepage": "https://github.com/angular/angular/tree/master/packages/compiler-cli"
}

View File

@ -4,7 +4,7 @@ set -ex
cd $(dirname $0)/../../..
ROOTDIR=$(pwd)
SRCDIR=${ROOTDIR}/modules/@angular/benchpress
SRCDIR=${ROOTDIR}/packages/benchpress
DESTDIR=${ROOTDIR}/dist/packages-dist/benchpress
rm -fr ${DESTDIR}

View File

@ -1,5 +1,5 @@
{
"typings": "../typings/testing.d.ts",
"typings": "../typings/testing/index.d.ts",
"main": "../bundles/common-testing.umd.js",
"module": "../@angular/common/testing.es5.js",
"es2015": "../@angular/common/testing.js"

View File

@ -128,11 +128,11 @@ $ cp tools/@angular/tsc-wrapped/package.json dist/tools/@angular/tsc-wrapped
$ ./scripts/ci/offline_compiler_test.sh
# Keep a package fresh in watch mode
./node_modules/.bin/tsc -p modules/@angular/compiler/tsconfig-es5.json -w
./node_modules/.bin/tsc -p packages/compiler/tsconfig-build.json -w
# Recompile @angular/core module (needs to use tsc-ext to keep the metadata)
$ export NODE_PATH=${NODE_PATH}:$(pwd)/dist/all:$(pwd)/dist/tools
$ node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/core/tsconfig-es5.json
$ node dist/tools/@angular/tsc-wrapped/src/main -p packages/core/tsconfig-build.json
# Iterate on the test
$ cd /tmp/wherever/e2e_test.1464388257/

View File

@ -34,5 +34,5 @@
"bugs": {
"url": "https://github.com/angular/angular/issues"
},
"homepage": "https://github.com/angular/angular/tree/master/modules/@angular/compiler-cli"
"homepage": "https://github.com/angular/angular/tree/master/packages/compiler-cli"
}

View File

@ -1,5 +1,5 @@
{
"typings": "../typings/testing.d.ts",
"typings": "../typings/testing/index.d.ts",
"main": "../bundles/compiler-testing.umd.js",
"module": "../@angular/compiler/testing.es5.js",
"es2015": "../@angular/compiler/testing.js"

View File

@ -1,5 +1,5 @@
{
"typings": "../typings/testing.d.ts",
"typings": "../typings/testing/index.d.ts",
"main": "../bundles/core-testing.umd.js",
"module": "../@angular/core/testing.es5.js",
"es2015": "../@angular/core/testing.js"

View File

@ -54,12 +54,12 @@ interface NumberConstructor {
// Workaround https://github.com/Microsoft/TypeScript/issues/9193
interface PromiseConstructor {
all<T>(values: (T | PromiseLike<T>)[]): Promise<T[]>;
all<T>(values: (T|PromiseLike<T>)[]): Promise<T[]>;
}
interface Function {
/**
* Returns the name of the function. Function names are read-only and can not be changed.
*/
readonly name: string;
/**
* Returns the name of the function. Function names are read-only and can not be changed.
*/
readonly name: string;
}

View File

@ -11,7 +11,7 @@ behavior) just like an Angular application developer would write.
./build.sh
# run when test change
./modules/@angular/examples/build.sh
./packages/examples/build.sh
# start server
$(npm bin)/gulp serve-examples
@ -26,7 +26,7 @@ navigate to [http://localhost:8001](http://localhost:8001)
./build.sh
# run to compile tests and run them
./modules/@angular/examples/test.sh
./packages/examples/test.sh
```
NOTE: sometimes the http server does not exit properly and it retains the `8001` port.

View File

@ -1,5 +1,5 @@
{
"typings": "../typings/testing.d.ts",
"typings": "../typings/testing/index.d.ts",
"main": "../bundles/http-testing.umd.js",
"module": "../@angular/http/testing.es5.js",
"es2015": "../@angular/http/testing.js"

View File

@ -24,7 +24,7 @@ var esm_suffixes = {};
function normalize(fileName) {
return path.resolve(__dirname, fileName);
}
console.log('running')
function resolve(id, from) {
// console.log('Resolve id:', id, 'from', from)
if (id == '@angular/tsc-wrapped') {
@ -37,7 +37,8 @@ function resolve(id, from) {
var packageName = match[1];
var esm_suffix = esm_suffixes[packageName] || '';
var loc = locations[packageName] || location;
var r = loc !== location && (loc + esm_suffix + packageName + (match[3] || '/index') + '.js') || loc + packageName + '/@angular/' + packageName + '.es5.js';
var r = loc !== location && (loc + esm_suffix + packageName + (match[3] || '/index') + '.js') ||
loc + packageName + '/@angular/' + packageName + '.es5.js';
// console.log('** ANGULAR MAPPED **: ', r);
return r;
}

View File

@ -6,9 +6,6 @@
* found in the LICENSE file at https://angular.io/license
*/
/// <reference path="../../../node_modules/@types/node/index.d.ts" />
/// <reference path="../../../node_modules/@types/jasmine/index.d.ts" />
import * as fs from 'fs';
import * as path from 'path';
import * as ts from 'typescript';

View File

@ -7,7 +7,8 @@
*/
export default {
entry: '../../dist/packages-dist/platform-browser-dynamic/@angular/platform-browser-dynamic.es5.js',
entry:
'../../dist/packages-dist/platform-browser-dynamic/@angular/platform-browser-dynamic.es5.js',
dest: '../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
format: 'umd',
moduleName: 'ng.platformBrowserDynamic',

View File

@ -19,7 +19,7 @@ export function main() {
// will be relative to here, so url200 should look like
// static_assets/200.html.
// We currently have no way of detecting this.
const url200 = '/base/modules/@angular/platform-browser/test/browser/static_assets/200.html';
const url200 = '/base/packages/platform-browser/test/browser/static_assets/200.html';
const url404 = '/bad/path/404.html';
beforeEach(() => { resourceLoader = new ResourceLoaderImpl(); });

View File

@ -26,7 +26,7 @@ class FancyService {
@Component({
selector: 'external-template-comp',
templateUrl: '/base/modules/@angular/platform-browser/test/static_assets/test.html'
templateUrl: '/base/packages/platform-browser/test/static_assets/test.html'
})
class ExternalTemplateComp {
}
@ -48,8 +48,7 @@ export function main() {
it('should run async tests with ResourceLoaders', async(() => {
const resourceLoader = new ResourceLoaderImpl();
resourceLoader
.get('/base/modules/@angular/platform-browser/test/static_assets/test.html')
resourceLoader.get('/base/packages/platform-browser/test/static_assets/test.html')
.then(() => { actuallyDone = true; });
}),
10000); // Long timeout here because this test makes an actual ResourceLoader.

View File

@ -1,5 +1,5 @@
{
"typings": "../typings/testing.d.ts",
"typings": "../typings/testing/index.d.ts",
"main": "../bundles/platform-browser-dynamic-testing.umd.js",
"module": "../@angular/platform-browser-dynamic/testing.es5.js",
"es2015": "../@angular/platform-browser-dynamic/testing.js"

View File

@ -7,7 +7,8 @@
*/
export default {
entry: '../../../dist/packages-dist/platform-browser-dynamic/@angular/platform-browser-dynamic/testing.es5.js',
entry:
'../../../dist/packages-dist/platform-browser-dynamic/@angular/platform-browser-dynamic/testing.es5.js',
dest:
'../../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
format: 'umd',

View File

@ -1,5 +1,5 @@
{
"typings": "../typings/animations.d.ts",
"typings": "../typings/animations/index.d.ts",
"main": "../bundles/platform-browser-animations.umd.js",
"module": "../@angular/platform-browser/animations.es5.js",
"es2015": "../@angular/platform-browser/animations.js"

View File

@ -7,8 +7,10 @@
*/
export default {
entry: '../../../../dist/packages-dist/platform-browser/@angular/platform-browser/animations/testing.es5.js',
dest: '../../../../dist/packages-dist/platform-browser/bundles/platform-browser-animations-testing.umd.js',
entry:
'../../../../dist/packages-dist/platform-browser/@angular/platform-browser/animations/testing.es5.js',
dest:
'../../../../dist/packages-dist/platform-browser/bundles/platform-browser-animations-testing.umd.js',
format: 'umd',
moduleName: 'ng.platformBrowser.testing',
globals: {

View File

@ -103,10 +103,8 @@ class CompUsingModuleDirectiveAndPipe {
class SomeLibModule {
}
@Component({
selector: 'comp',
templateUrl: '/base/modules/@angular/platform-browser/test/static_assets/test.html'
})
@Component(
{selector: 'comp', templateUrl: '/base/packages/platform-browser/test/static_assets/test.html'})
class CompWithUrlTemplate {
}

View File

@ -1,5 +1,5 @@
{
"typings": "../typings/testing.d.ts",
"typings": "../typings/testing/index.d.ts",
"main": "../bundles/platform-browser-testing.umd.js",
"module": "../@angular/platform-browser/testing.es5.js",
"es2015": "../@angular/platform-browser/testing.js"

View File

@ -1,5 +1,5 @@
{
"typings": "../typings/testing.d.ts",
"typings": "../typings/testing/index.d.ts",
"main": "../bundles/platform-server-testing.umd.js",
"module": "../@angular/platform-server/testing.es5.js",
"es2015": "../@angular/platform-server/testing.js"

View File

@ -7,7 +7,8 @@
*/
export default {
entry: '../../dist/packages-dist/platform-webworker-dynamic/@angular/platform-webworker-dynamic.es5.js',
entry:
'../../dist/packages-dist/platform-webworker-dynamic/@angular/platform-webworker-dynamic.es5.js',
dest:
'../../dist/packages-dist/platform-webworker-dynamic/bundles/platform-webworker-dynamic.umd.js',
format: 'umd',

View File

@ -40,7 +40,7 @@ module.exports = function(config) {
{pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false},
// shim
{pattern: 'modules/@angular/router/karma-test-shim.js', included: true, watched: true},
{pattern: 'packages/router/karma-test-shim.js', included: true, watched: true},
// Angular modules
{pattern: 'dist/all/@angular/core/*.js', included: false, watched: false},

View File

@ -1,5 +1,5 @@
{
"typings": "../typings/testing.d.ts",
"typings": "../typings/testing/index.d.ts",
"main": "../bundles/router-testing.umd.js",
"module": "../@angular/router/testing.es5.js",
"es2015": "../@angular/router/testing.js"

View File

@ -1,5 +1,5 @@
{
"typings": "../typings/upgrade.d.ts",
"typings": "../typings/upgrade/index.d.ts",
"main": "../bundles/router-upgrade.umd.js",
"module": "../@angular/router/upgrade.es5.js",
"es2015": "../@angular/router/upgrade.js"

View File

@ -6,7 +6,7 @@
"emitDecoratorMetadata": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": "../dist/all/",
"outDir": "../dist/all/@angular",
"noImplicitAny": true,
"noFallthroughCasesInSwitch": true,
"paths": {
@ -26,13 +26,6 @@
"types": ["angularjs"]
},
"exclude": [
"angular1_router",
"benchmarks/e2e_test/old",
"benchmarks/src/old",
"benchmarks/src/**/index_aot.ts",
"benchmarks_external",
"payload_tests",
"rollup-test",
"compiler-cli/integrationtest"
]
}

View File

@ -1,5 +1,5 @@
{
"typings": "../typings/static.d.ts",
"typings": "../typings/static/index.d.ts",
"main": "../bundles/upgrade-static.umd.js",
"module": "../@angular/upgrade/static.es5.js",
"es2015": "../@angular/upgrade/static.js"

View File

@ -22,17 +22,17 @@ travisFoldEnd "tsc tools"
travisFoldStart "tsc all"
node --max-old-space-size=3000 dist/tools/@angular/tsc-wrapped/src/main -p modules
node --max-old-space-size=3000 dist/tools/@angular/tsc-wrapped/src/main -p packages
travisFoldEnd "tsc all"
# TODO(i): what are these compilations here for?
travisFoldStart "tsc a bunch of useless stuff"
node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/core/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/common/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/platform-browser/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/router/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/forms/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p packages/core/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p packages/common/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p packages/platform-browser/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p packages/router/tsconfig-build.json
node dist/tools/@angular/tsc-wrapped/src/main -p packages/forms/tsconfig-build.json
travisFoldEnd "tsc a bunch of useless stuff"

View File

@ -2,6 +2,9 @@
set -u -e -o pipefail
TRAVIS=${TRAVIS:-}
CI_MODE=${CI_MODE:-}
# Setup environment
readonly thisDir=$(cd $(dirname $0); pwd)
source ${thisDir}/_travis-fold.sh

View File

@ -23,7 +23,7 @@ PKGS=(
TMPDIR=${TMPDIR:-.}
readonly TMP=$TMPDIR/e2e_test.$(date +%s)
mkdir -p $TMP
cp -R -v modules/@angular/compiler-cli/integrationtest/* $TMP
cp -R -v packages/compiler-cli/integrationtest/* $TMP
cp -R -v modules/benchmarks $TMP
# Try to use the same versions as angular, in particular, this will
# cause us to install the same rxjs version.

View File

@ -12,7 +12,7 @@ travisFoldStart "test.e2e.buildPackages"
travisFoldEnd "test.e2e.buildPackages"
if [[ ${TRAVIS} ]]; then
if [[ ${TRAVIS:-} ]]; then
travisFoldStart "test.e2e.xvfb-start"
sh -e /etc/init.d/xvfb start
travisFoldEnd "test.e2e.xvfb-start"

View File

@ -30,7 +30,7 @@ travisFoldEnd "test.unit.node"
# rebuild to revert files in @angular/compiler/test
# TODO(tbosch): remove this and teach karma to serve the right files
travisFoldStart "test.unit.rebuildHack"
node dist/tools/@angular/tsc-wrapped/src/main -p modules/tsconfig.json
node dist/tools/@angular/tsc-wrapped/src/main -p packages/tsconfig.json
travisFoldStart "test.unit.rebuildHack"
@ -47,5 +47,5 @@ travisFoldEnd "test.unit.localChrome"
travisFoldStart "test.unit.localChrome.router"
$(npm bin)/karma start ./modules/@angular/router/karma.conf.js --single-run --browsers=${KARMA_JS_BROWSERS}
$(npm bin)/karma start ./packages/router/karma.conf.js --single-run --browsers=${KARMA_JS_BROWSERS}
travisFoldEnd "test.unit.localChrome.router"

View File

@ -46,6 +46,7 @@ System.config({
'@angular/router': {main: 'index.js', defaultExtension: 'js'},
'@angular/http/testing': {main: 'index.js', defaultExtension: 'js'},
'@angular/http': {main: 'index.js', defaultExtension: 'js'},
'@angular/upgrade/static': {main: 'index.js', defaultExtension: 'js'},
'@angular/upgrade': {main: 'index.js', defaultExtension: 'js'},
'@angular/platform-browser/animations/testing': {main: 'index.js', defaultExtension: 'js'},
'@angular/platform-browser/animations': {main: 'index.js', defaultExtension: 'js'},

View File

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
const testingPlatformServer = require('../../all/@angular/platform-server/testing/server.js');
const testingPlatformServer = require('../../all/@angular/platform-server/testing/src/server.js');
const coreTesting = require('../../all/@angular/core/testing');
coreTesting.TestBed.initTestEnvironment(

View File

@ -1,6 +1,6 @@
// clang-format entry points
const srcsToFmt = [
'modules/@angular/**/*.{js,ts}',
'packages/**/*.{js,ts}',
'modules/benchmarks/**/*.{js,ts}',
'modules/e2e_util/**/*.{js,ts}',
'modules/playground/**/*.{js,ts}',

View File

@ -7,7 +7,7 @@ const entrypoints = [
//'dist/packages-dist/compiler/index.d.ts',
//'dist/packages-dist/compiler/testing.d.ts',
'dist/packages-dist/upgrade/typings/upgrade.d.ts',
'dist/packages-dist/upgrade/typings/static/static.d.ts',
'dist/packages-dist/upgrade/typings/static/index.d.ts',
'dist/packages-dist/platform-browser/typings/platform-browser.d.ts',
'dist/packages-dist/platform-browser/typings/testing/index.d.ts',
'dist/packages-dist/platform-browser-dynamic/typings/platform-browser-dynamic.d.ts',
@ -19,7 +19,7 @@ const entrypoints = [
'dist/packages-dist/http/typings/http.d.ts', 'dist/packages-dist/http/typings/testing/index.d.ts',
'dist/packages-dist/forms/typings/forms.d.ts', 'dist/packages-dist/router/typings/router.d.ts',
'dist/packages-dist/animations/typings/animations.d.ts',
'dist/packages-dist/platform-browser/typings/animations/animations.d.ts',
'dist/packages-dist/platform-browser/typings/animations/index.d.ts',
'dist/packages-dist/platform-browser/typings/animations/testing/index.d.ts'
];

View File

@ -9,7 +9,8 @@
class RollupNG2 {
resolveId(id, from) {
if (id.startsWith('@angular/')) {
return `${__dirname}/../../packages-dist/${id.split('/')[1]}/esm/index.js`;
const packageName = id.split('/')[1];
return `${__dirname}/../../packages-dist/${packageName}/@angular/packageName.es5.js`;
}
// if(id.startsWith('rxjs/')){

View File

@ -38,7 +38,7 @@ const BaseConfig = {
if (platform == 'node') {
tscWatch = new TscWatch(Object.assign(
{
tsconfig: 'modules/tsconfig.json',
tsconfig: 'packages/tsconfig.json',
onChangeCmds: [[
'node', 'dist/tools/cjs-jasmine', '--', '@angular/**/*_spec.js',
'@angular/compiler-cli/test/**/*_spec.js', '@angular/benchpress/test/**/*_spec.js'
@ -48,7 +48,7 @@ if (platform == 'node') {
} else if (platform == 'browser') {
tscWatch = new TscWatch(Object.assign(
{
tsconfig: 'modules/tsconfig.json',
tsconfig: 'packages/tsconfig.json',
onStartCmds: [
[
'node', 'node_modules/karma/bin/karma', 'start', '--no-auto-watch', '--port=9876',
@ -56,7 +56,7 @@ if (platform == 'node') {
],
[
'node', 'node_modules/karma/bin/karma', 'start', '--no-auto-watch', '--port=9877',
'modules/@angular/router/karma.conf.js'
'packages/router/karma.conf.js'
],
],
onChangeCmds: [
@ -68,11 +68,11 @@ if (platform == 'node') {
} else if (platform == 'router') {
tscWatch = new TscWatch(Object.assign(
{
tsconfig: 'modules/tsconfig.json',
tsconfig: 'packages/tsconfig.json',
onStartCmds: [
[
'node', 'node_modules/karma/bin/karma', 'start', '--no-auto-watch', '--port=9877',
'modules/@angular/router/karma.conf.js'
'packages/router/karma.conf.js'
],
],
onChangeCmds: [
@ -83,7 +83,7 @@ if (platform == 'node') {
} else if (platform == 'browserNoRouter') {
tscWatch = new TscWatch(Object.assign(
{
tsconfig: 'modules/tsconfig.json',
tsconfig: 'packages/tsconfig.json',
onStartCmds: [[
'node', 'node_modules/karma/bin/karma', 'start', '--no-auto-watch', '--port=9876',
'karma-js.conf.js'