diff --git a/packages/compiler/test/aot/compiler_spec.ts b/packages/compiler/test/aot/compiler_spec.ts index 1e42bc4056..dc267e4d48 100644 --- a/packages/compiler/test/aot/compiler_spec.ts +++ b/packages/compiler/test/aot/compiler_spec.ts @@ -10,7 +10,6 @@ import {AotCompiler, AotCompilerHost, AotCompilerOptions, createAotCompiler} fro import {RenderComponentType, ɵReflectionCapabilities as ReflectionCapabilities, ɵreflector as reflector} from '@angular/core'; import {async} from '@angular/core/testing'; import {MetadataBundler, MetadataCollector, ModuleMetadata, privateEntriesToIndex} from '@angular/tsc-wrapped'; -import * as path from 'path'; import * as ts from 'typescript'; import {EmittingCompilerHost, MockAotCompilerHost, MockCompilerHost, MockData, MockMetadataBundlerHost, settings} from './test_util'; diff --git a/packages/compiler/test/aot/test_util.ts b/packages/compiler/test/aot/test_util.ts index 6c3173aadd..3ae6c21e52 100644 --- a/packages/compiler/test/aot/test_util.ts +++ b/packages/compiler/test/aot/test_util.ts @@ -58,7 +58,7 @@ export class EmittingCompilerHost implements ts.CompilerHost { if (distIndex >= 0) { const root = moduleFilename.substr(0, distIndex); this.nodeModulesPath = path.join(root, 'node_modules'); - this.angularSourcePath = path.join(root, 'modules'); + this.angularSourcePath = path.join(root, 'packages'); // Rewrite references to scripts with '@angular' to its corresponding location in // the source tree. @@ -92,8 +92,10 @@ export class EmittingCompilerHost implements ts.CompilerHost { public get written(): Map { return this.writtenFiles; } public effectiveName(fileName: string): string { - return fileName.startsWith('@angular/') ? path.join(this.angularSourcePath, fileName) : - fileName; + const prefix = '@angular/'; + return fileName.startsWith('@angular/') ? + path.join(this.angularSourcePath, fileName.substr(prefix.length)) : + fileName; } // ts.ModuleResolutionHost @@ -177,7 +179,7 @@ export class MockCompilerHost implements ts.CompilerHost { if (distIndex >= 0) { const root = moduleFilename.substr(0, distIndex); this.nodeModulesPath = path.join(root, 'node_modules'); - this.angularSourcePath = path.join(root, 'modules'); + this.angularSourcePath = path.join(root, 'packages'); } } @@ -309,7 +311,8 @@ export class MockCompilerHost implements ts.CompilerHost { const rxjs = '/rxjs'; if (name.startsWith('/' + node_modules)) { if (this.angularSourcePath && name.startsWith('/' + node_modules + at_angular)) { - return path.join(this.angularSourcePath, name.substr(node_modules.length + 1)); + return path.join( + this.angularSourcePath, name.substr(node_modules.length + at_angular.length + 1)); } if (this.nodeModulesPath && name.startsWith('/' + node_modules + rxjs)) { return path.join(this.nodeModulesPath, name.substr(node_modules.length + 1)); diff --git a/packages/router/karma.conf.js b/packages/router/karma.conf.js index 689cf406cc..151bf2fd50 100644 --- a/packages/router/karma.conf.js +++ b/packages/router/karma.conf.js @@ -6,13 +6,13 @@ * found in the LICENSE file at https://angular.io/license */ -var browserProvidersConf = require('../../../browser-providers.conf.js'); +var browserProvidersConf = require('../../browser-providers.conf.js'); // Karma configuration module.exports = function(config) { config.set({ - basePath: '../../../', + basePath: '../../', frameworks: ['jasmine'], diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index f195976ba3..0cd774fd89 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -23,6 +23,7 @@ travisFoldEnd "tsc tools" travisFoldStart "tsc all" node --max-old-space-size=3000 dist/tools/@angular/tsc-wrapped/src/main -p packages + node --max-old-space-size=3000 dist/tools/@angular/tsc-wrapped/src/main -p modules travisFoldEnd "tsc all" diff --git a/scripts/ci/test-js.sh b/scripts/ci/test-js.sh index 69abd215d6..b9c6d8020d 100755 --- a/scripts/ci/test-js.sh +++ b/scripts/ci/test-js.sh @@ -31,6 +31,7 @@ travisFoldEnd "test.unit.node" # 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 packages/tsconfig.json + node dist/tools/@angular/tsc-wrapped/src/main -p modules/tsconfig.json travisFoldStart "test.unit.rebuildHack" diff --git a/test.sh b/test.sh index 298e7b1bcf..dc51694db7 100755 --- a/test.sh +++ b/test.sh @@ -21,6 +21,7 @@ else if [[ $1 == 'node' ]]; then # Note: .metadata.json files are needed for the language service tests! echo "Creating .metadata.json files..." + node dist/tools/@angular/tsc-wrapped/src/main -p packages node dist/tools/@angular/tsc-wrapped/src/main -p modules fi node dist/tools/tsc-watch/ $1 watch