From 8dd3f59c811a76352313b50f2e05075e6e4f6133 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Tue, 21 Jun 2016 10:35:42 -0700 Subject: [PATCH] chore(router): changes the router setup to align with other modules --- build.sh | 35 ++++++----- modules/@angular/router/index.js | 1 - modules/@angular/router/index.ts | 16 +++++ modules/@angular/router/karma-test-shim.js | 14 ++--- modules/@angular/router/karma.conf.js | 46 +++++++++++--- modules/@angular/router/package.json | 61 +++---------------- modules/@angular/router/rollup.config.js | 29 +++++++++ modules/@angular/router/scripts/build.sh | 4 ++ modules/@angular/router/scripts/karma.sh | 2 + modules/@angular/router/src/index.ts | 16 ----- modules/@angular/router/src/router.ts | 5 +- .../@angular/router/src/router_outlet_map.ts | 3 - modules/@angular/router/test/router.spec.ts | 2 +- .../router/tools/rewrite-published-package.js | 17 ------ modules/@angular/router/tsconfig-es2015.json | 26 ++++++++ modules/@angular/router/tsconfig-es5.json | 28 +++++++++ modules/@angular/router/tsconfig.json | 31 +++++----- .../@angular/router/tsconfig.publish.es5.json | 20 ------ .../@angular/router/tsconfig.publish.esm.json | 19 ------ modules/@angular/router/typings.json | 8 --- modules/tsconfig.json | 3 +- scripts/ci-lite/build.sh | 1 + scripts/ci-lite/test_js.sh | 3 + tools/typings-test/test.sh | 2 +- 24 files changed, 202 insertions(+), 190 deletions(-) delete mode 100644 modules/@angular/router/index.js create mode 100644 modules/@angular/router/index.ts create mode 100644 modules/@angular/router/rollup.config.js create mode 100755 modules/@angular/router/scripts/build.sh create mode 100755 modules/@angular/router/scripts/karma.sh delete mode 100644 modules/@angular/router/src/index.ts delete mode 100644 modules/@angular/router/tools/rewrite-published-package.js create mode 100644 modules/@angular/router/tsconfig-es2015.json create mode 100644 modules/@angular/router/tsconfig-es5.json delete mode 100644 modules/@angular/router/tsconfig.publish.es5.json delete mode 100644 modules/@angular/router/tsconfig.publish.esm.json delete mode 100644 modules/@angular/router/typings.json diff --git a/build.sh b/build.sh index 2d700e7a9d..47607a54f6 100755 --- a/build.sh +++ b/build.sh @@ -49,6 +49,7 @@ for PACKAGE in \ platform-browser-dynamic \ platform-server \ http \ + router \ router-deprecated \ upgrade \ compiler-cli @@ -93,25 +94,27 @@ do echo "====== BUNDLING: ${SRCDIR} =====" mkdir ${DESTDIR}/bundles - ( - cd ${SRCDIR} - echo "..." # here just to have grep match something and not exit with 1 - ../../../node_modules/.bin/rollup -c rollup.config.js - ) 2>&1 | grep -v "as external dependency" + if [[ ${PACKAGE} != router ]]; then + ( + cd ${SRCDIR} + echo "..." # here just to have grep match something and not exit with 1 + ../../../node_modules/.bin/rollup -c rollup.config.js + ) 2>&1 | grep -v "as external dependency" - $(npm bin)/tsc \ - --out ${UMD_ES5_PATH} \ - --target es5 \ - --lib "es6,dom" \ - --allowJs \ - ${UMD_ES6_PATH} + $(npm bin)/tsc \ + --out ${UMD_ES5_PATH} \ + --target es5 \ + --lib "es6,dom" \ + --allowJs \ + ${UMD_ES6_PATH} - rm ${UMD_ES6_PATH} + rm ${UMD_ES6_PATH} - cat ./modules/@angular/license-banner.txt > ${UMD_ES5_PATH}.tmp - cat ${UMD_ES5_PATH} >> ${UMD_ES5_PATH}.tmp - mv ${UMD_ES5_PATH}.tmp ${UMD_ES5_PATH} + cat ./modules/@angular/license-banner.txt > ${UMD_ES5_PATH}.tmp + cat ${UMD_ES5_PATH} >> ${UMD_ES5_PATH}.tmp + mv ${UMD_ES5_PATH}.tmp ${UMD_ES5_PATH} - $(npm bin)/uglifyjs -c --screw-ie8 -o ${UMD_ES5_MIN_PATH} ${UMD_ES5_PATH} + $(npm bin)/uglifyjs -c --screw-ie8 -o ${UMD_ES5_MIN_PATH} ${UMD_ES5_PATH} + fi fi done diff --git a/modules/@angular/router/index.js b/modules/@angular/router/index.js deleted file mode 100644 index 9e37e57b5b..0000000000 --- a/modules/@angular/router/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('src/index'); \ No newline at end of file diff --git a/modules/@angular/router/index.ts b/modules/@angular/router/index.ts new file mode 100644 index 0000000000..a9d1d07172 --- /dev/null +++ b/modules/@angular/router/index.ts @@ -0,0 +1,16 @@ +import {RouterLink} from './src/directives/router_link'; +import {RouterLinkActive} from './src/directives/router_link_active'; +import {RouterOutlet} from './src/directives/router_outlet'; + +export {ExtraOptions} from './src/common_router_providers'; +export {Route, RouterConfig} from './src/config'; +export {CanActivate, CanDeactivate} from './src/interfaces'; +export {Event, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Router, RoutesRecognized} from './src/router'; +export {RouterOutletMap} from './src/router_outlet_map'; +export {provideRouter} from './src/router_providers'; +export {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './src/router_state'; +export {PRIMARY_OUTLET, Params} from './src/shared'; +export {DefaultUrlSerializer, UrlSerializer} from './src/url_serializer'; +export {UrlPathWithParams, UrlTree} from './src/url_tree'; + +export const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkActive]; \ No newline at end of file diff --git a/modules/@angular/router/karma-test-shim.js b/modules/@angular/router/karma-test-shim.js index 17c1caa62c..b94bb2f8de 100644 --- a/modules/@angular/router/karma-test-shim.js +++ b/modules/@angular/router/karma-test-shim.js @@ -1,11 +1,10 @@ /*global jasmine, __karma__, window*/ -Error.stackTraceLimit = Infinity; +Error.stackTraceLimit = 10; jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; __karma__.loaded = function () { }; - function isJsFile(path) { return path.slice(-3) == '.js'; } @@ -32,14 +31,9 @@ System.config( { map: { 'rxjs': 'node_modules/rxjs', - '@angular': 'node_modules/@angular', - 'app': 'dist' + '@angular': 'dist/all/@angular' }, packages: { - 'app': { - main: 'main.js', - defaultExtension: 'js' - }, '@angular/core': { main: 'index.js', defaultExtension: 'js' @@ -60,6 +54,10 @@ System.config( main: 'index.js', defaultExtension: 'js' }, + '@angular/router': { + main: 'index.js', + defaultExtension: 'js' + }, 'rxjs': { main: 'Rx.js', defaultExtension: 'js' diff --git a/modules/@angular/router/karma.conf.js b/modules/@angular/router/karma.conf.js index f07f30ec22..efa15ff91e 100644 --- a/modules/@angular/router/karma.conf.js +++ b/modules/@angular/router/karma.conf.js @@ -1,15 +1,16 @@ +var browserProvidersConf = require('../../../browser-providers.conf.js'); + // Karma configuration module.exports = function(config) { config.set({ - basePath: '', + basePath: '../../../', frameworks: ['jasmine'], files: [ // Polyfills. 'node_modules/es6-shim/es6-shim.js', - 'node_modules/reflect-metadata/Reflect.js', // System.js for module loading @@ -27,17 +28,42 @@ module.exports = function(config) { { pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false }, { pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false }, + // shim + {pattern: 'modules/@angular/router/karma-test-shim.js', included: true, watched: true }, - {pattern: 'karma-test-shim.js', included: true, watched: true}, - {pattern: 'built/test/matchers.js', included: true, watched: true}, + // Angular modules + {pattern: 'dist/all/@angular/core/*.js', included: false, watched: false}, + {pattern: 'dist/all/@angular/core/src/**/*.js', included: false, watched: false}, + {pattern: 'dist/all/@angular/core/testing/**/*.js', included: false, watched: false}, - // paths loaded via module imports - // Angular itself - {pattern: 'node_modules/@angular/**/*.js', included: false, watched: true}, - {pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: true}, + {pattern: 'dist/all/@angular/common/*.js', included: false, watched: false}, + {pattern: 'dist/all/@angular/common/src/**/*.js', included: false, watched: false}, + {pattern: 'dist/all/@angular/common/testing/**/*.js', included: false, watched: false}, - {pattern: 'dist/**/*.js', included: false, watched: true}, - {pattern: 'dist/**/*.js.map', included: false, watched: false} + {pattern: 'dist/all/@angular/compiler/*.js', included: false, watched: false}, + {pattern: 'dist/all/@angular/compiler/src/**/*.js', included: false, watched: false}, + {pattern: 'dist/all/@angular/compiler/testing/**/*.js', included: false, watched: false}, + + {pattern: 'dist/all/@angular/platform-browser/*.js', included: false, watched: false}, + {pattern: 'dist/all/@angular/platform-browser/src/**/*.js', included: false, watched: false}, + {pattern: 'dist/all/@angular/platform-browser/testing/**/*.js', included: false, watched: false}, + + {pattern: 'dist/all/@angular/platform-browser-dynamic/*.js', included: false, watched: false}, + {pattern: 'dist/all/@angular/platform-browser-dynamic/src/**/*.js', included: false, watched: false}, + {pattern: 'dist/all/@angular/platform-browser-dynamic/testing/**/*.js', included: false, watched: false}, + + // Router + {pattern: 'dist/all/@angular/router/**/*.js', included: false, watched: false} + ], + + customLaunchers: browserProvidersConf.customLaunchers, + + plugins: [ + 'karma-jasmine', + 'karma-browserstack-launcher', + 'karma-sauce-launcher', + 'karma-chrome-launcher', + 'karma-sourcemap-loader' ], preprocessors: { diff --git a/modules/@angular/router/package.json b/modules/@angular/router/package.json index a5e20261a2..be3a126b43 100644 --- a/modules/@angular/router/package.json +++ b/modules/@angular/router/package.json @@ -2,19 +2,8 @@ "name": "@angular/router", "version": "3.0.0-alpha.7", "description": "", - "main": "./dist/index.js", - "jsnext:main": "./dist/esm/index.js", - "scripts": { - "karma": "karma start", - "test": "npm run build; karma start", - "build_watch": "rm -rf dist; tsc -w", - "build": "rm -rf dist; tsc", - "build_npm": "rm -rf dist && tsc -p tsconfig.publish.es5.json && tsc -p tsconfig.publish.esm.json", - "postbuild_npm": "cp package.json README.md dist/ && npm run rewrite_npm_package", - "devsetup": "typings install", - "rewrite_npm_package": "node --harmony_destructuring tools/rewrite-published-package.js", - "build_bundle": "cp -r src router && tsc typings/index.d.ts src/router.ts --rootDir . --module system -t es5 --outFile dist/bundles/router.js --moduleResolution node --emitDecoratorMetadata --experimentalDecorators", - }, + "main": "index.js", + "jsnext:main": "esm/index.js", "keywords": [ "angular2", "angular", @@ -24,49 +13,19 @@ "type": "git", "url": "git+https://github.com/angular/angular.git" }, - "author": "vsavkin", + "author": "angular", "license": "MIT", "bugs": { "url": "https://github.com/angular/angular/issues" }, "homepage": "https://github.com/angular/angular#readme", - "dependencies": { - "@angular/common": "^2.0.0-rc.2", - "@angular/compiler": "^2.0.0-rc.2", - "@angular/core": "^2.0.0-rc.2", - "@angular/platform-browser": "^2.0.0-rc.2", - "@angular/platform-browser-dynamic": "^2.0.0-rc.2", + "peerDependencies": { + "@angular/core": "0.0.0-PLACEHOLDER", + "@angular/compiler": "0.0.0-PLACEHOLDER", + "@angular/common": "0.0.0-PLACEHOLDER", + "@angular/platform-browser": "0.0.0-PLACEHOLDER", + "@angular/platform-browser-dynamic": "0.0.0-PLACEHOLDER", "rxjs": "5.0.0-beta.6" }, - "devDependencies": { - "es6-module-loader": "^0.17.10", - "es6-shim": "^0.35.0", - "gulp": "^3.9.0", - "gulp-jasmine": "^2.2.1", - "gulp-typescript": "^2.10.0", - "http-server": "^0.8.5", - "jasmine": "^2.4.1", - "jasmine-core": "^2.4.1", - "json": "^9.0.3", - "karma": "^0.13.19", - "karma-chrome-launcher": "^0.2.2", - "karma-firefox-launcher": "^0.1.7", - "karma-jasmine": "^0.3.6", - "karma-systemjs": "^0.10.0", - "karma-sourcemap-loader": "~0.3", - "parse5": "^1.3.2", - "protractor": "3.0.0", - "reflect-metadata": "0.1.2", - "systemjs": "^0.19.16", - "systemjs-builder": "^0.15.7", - "traceur": "0.0.96", - "tsd": "^0.6.5", - "typescript": "^1.8.10", - "typings": "^1.0.4", - "zone.js": "^0.6.6", - "clang-format": "^1.0.35", - "tslint": "^3.6.0", - "codelyzer": "0.0.14" - }, - "typings": "dist/index.d.ts" + "typings": "index.d.ts" } diff --git a/modules/@angular/router/rollup.config.js b/modules/@angular/router/rollup.config.js new file mode 100644 index 0000000000..0b0235ddff --- /dev/null +++ b/modules/@angular/router/rollup.config.js @@ -0,0 +1,29 @@ +export default { + entry: '../../../dist/packages-dist/router/esm/index.js', + dest: '../../../dist/packages-dist/router/esm/router.umd.js', + format: 'umd', + moduleName: 'ng.router', + globals: { + '@angular/core': 'ng.core', + '@angular/common': 'ng.common', + '@angular/compiler': 'ng.compiler', + '@angular/platform-browser': 'ng.platformBrowser', + '@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic', + + 'rxjs/Observable': 'Rx', + 'rxjs/Subject': 'Rx', + 'rxjs/BehaviorSubject': 'Rx', + 'rxjs/Observer': 'Rx', + 'rxjs/Subscription': 'Rx', + + 'rxjs/observable/PromiseObservable': 'Rx', // this is wrong, but this stuff has changed in rxjs b.6 so we need to fix it when we update. + 'rxjs/operator/toPromise': 'Rx.Observable.prototype', + 'rxjs/operator/map': 'Rx.Observable.prototype', + 'rxjs/operator/mergeMap': 'Rx.Observable.prototype', + 'rxjs/operator/mergeAll': 'Rx.Observable.prototype', + 'rxjs/operator/every': 'Rx.Observable.prototype', + }, + plugins: [ +// nodeResolve({ jsnext: true, main: true }), + ] +} \ No newline at end of file diff --git a/modules/@angular/router/scripts/build.sh b/modules/@angular/router/scripts/build.sh new file mode 100755 index 0000000000..74a433be87 --- /dev/null +++ b/modules/@angular/router/scripts/build.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +set -e -o pipefail +../../../node_modules/.bin/tsc -w \ No newline at end of file diff --git a/modules/@angular/router/scripts/karma.sh b/modules/@angular/router/scripts/karma.sh new file mode 100755 index 0000000000..1d4c0ecc1f --- /dev/null +++ b/modules/@angular/router/scripts/karma.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +../../../node_modules/.bin/karma start \ No newline at end of file diff --git a/modules/@angular/router/src/index.ts b/modules/@angular/router/src/index.ts deleted file mode 100644 index 6851cb1f00..0000000000 --- a/modules/@angular/router/src/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {RouterLink} from './directives/router_link'; -import {RouterLinkActive} from './directives/router_link_active'; -import {RouterOutlet} from './directives/router_outlet'; - -export {ExtraOptions} from './common_router_providers'; -export {Route, RouterConfig} from './config'; -export {CanActivate, CanDeactivate} from './interfaces'; -export {Event, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Router, RoutesRecognized} from './router'; -export {RouterOutletMap} from './router_outlet_map'; -export {provideRouter} from './router_providers'; -export {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state'; -export {PRIMARY_OUTLET, Params} from './shared'; -export {DefaultUrlSerializer, UrlSerializer} from './url_serializer'; -export {UrlPathWithParams, UrlTree} from './url_tree'; - -export const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkActive]; \ No newline at end of file diff --git a/modules/@angular/router/src/router.ts b/modules/@angular/router/src/router.ts index 9c91e8959d..a8b3c68d5a 100644 --- a/modules/@angular/router/src/router.ts +++ b/modules/@angular/router/src/router.ts @@ -1,10 +1,7 @@ import 'rxjs/add/operator/map'; -import 'rxjs/add/operator/scan'; import 'rxjs/add/operator/mergeMap'; -import 'rxjs/add/operator/concat'; -import 'rxjs/add/operator/concatMap'; -import 'rxjs/add/operator/every'; import 'rxjs/add/operator/mergeAll'; +import 'rxjs/add/operator/every'; import 'rxjs/add/observable/from'; import {Location} from '@angular/common'; diff --git a/modules/@angular/router/src/router_outlet_map.ts b/modules/@angular/router/src/router_outlet_map.ts index d466543496..cfda1ef635 100644 --- a/modules/@angular/router/src/router_outlet_map.ts +++ b/modules/@angular/router/src/router_outlet_map.ts @@ -1,8 +1,5 @@ import {RouterOutlet} from './directives/router_outlet'; -/** - * @internal - */ export class RouterOutletMap { /** @internal */ _outlets: {[name: string]: RouterOutlet} = {}; diff --git a/modules/@angular/router/test/router.spec.ts b/modules/@angular/router/test/router.spec.ts index 1a71f1fd41..7259679a3c 100644 --- a/modules/@angular/router/test/router.spec.ts +++ b/modules/@angular/router/test/router.spec.ts @@ -9,7 +9,7 @@ import {beforeEach, beforeEachProviders, ddescribe, describe, expect, fakeAsync, import {Observable} from 'rxjs/Observable'; import {of } from 'rxjs/observable/of'; -import {ActivatedRoute, ActivatedRouteSnapshot, CanActivate, CanDeactivate, DefaultUrlSerializer, Event, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Params, ROUTER_DIRECTIVES, Router, RouterConfig, RouterOutletMap, RouterStateSnapshot, RoutesRecognized, UrlSerializer} from '../src/index'; +import {ActivatedRoute, ActivatedRouteSnapshot, CanActivate, CanDeactivate, DefaultUrlSerializer, Event, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, Params, ROUTER_DIRECTIVES, Router, RouterConfig, RouterOutletMap, RouterStateSnapshot, RoutesRecognized, UrlSerializer} from '../index'; describe('Integration', () => { diff --git a/modules/@angular/router/tools/rewrite-published-package.js b/modules/@angular/router/tools/rewrite-published-package.js deleted file mode 100644 index b5d8850d56..0000000000 --- a/modules/@angular/router/tools/rewrite-published-package.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Rewrite the package.json that gets published to npm. - * * Change main to point to router.js instead of dist/router.js - * * Change angular2 to be a peer dependency - */ -var fs = require('fs'); -var srcPackage = require('../package.json'); -var [MAIN, JSNEXT_MAIN] = ['main', 'jsnext:main'].map(k => srcPackage[k].replace('/dist/', '/')); -var outPackage = Object.assign({}, srcPackage, { - peerDependencies: srcPackage.dependencies, - main: MAIN, - typings: "index.d.ts", - "jsnext:main": JSNEXT_MAIN, - dependencies: undefined -}); - -fs.writeFileSync('./dist/package.json', JSON.stringify(outPackage, null, 2)); \ No newline at end of file diff --git a/modules/@angular/router/tsconfig-es2015.json b/modules/@angular/router/tsconfig-es2015.json new file mode 100644 index 0000000000..50d8392ef0 --- /dev/null +++ b/modules/@angular/router/tsconfig-es2015.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "declaration": true, + "stripInternal": true, + "experimentalDecorators": true, + "module": "commonjs", + "moduleResolution": "node", + "outDir": "../../../dist/packages-dist/router/esm", + "paths": { + "@angular/core": ["../../../dist/packages-dist/core"], + "@angular/common": ["../../../dist/packages-dist/common"], + "@angular/compiler": ["../../../dist/packages-dist/compiler"], + "@angular/platform-browser": ["../../../dist/packages-dist/platform-browser"], + "@angular/platform-browser-dynamic": ["../../../dist/packages-dist/platform-browser-dynamic"] + }, + "rootDir": ".", + "sourceMap": true, + "inlineSources": true, + "lib": ["es6", "dom"], + "target": "es6" + }, + "files": [ + "index.ts" + ] +} \ No newline at end of file diff --git a/modules/@angular/router/tsconfig-es5.json b/modules/@angular/router/tsconfig-es5.json new file mode 100644 index 0000000000..63d035662b --- /dev/null +++ b/modules/@angular/router/tsconfig-es5.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "declaration": true, + "stripInternal": true, + "experimentalDecorators": true, + "module": "commonjs", + "moduleResolution": "node", + "outDir": "../../../dist/packages-dist/router/", + "paths": { + "@angular/core": ["../../../dist/packages-dist/core"], + "@angular/common": ["../../../dist/packages-dist/common"], + "@angular/compiler": ["../../../dist/packages-dist/compiler"], + "@angular/platform-browser": ["../../../dist/packages-dist/platform-browser"], + "@angular/platform-browser-dynamic": ["../../../dist/packages-dist/platform-browser-dynamic"] + }, + "rootDir": ".", + "sourceMap": true, + "inlineSources": true, + "lib": ["es6", "dom"], + "target": "es5" + }, + "files": [ + "index.ts" + ] +} + + diff --git a/modules/@angular/router/tsconfig.json b/modules/@angular/router/tsconfig.json index 8cabff1338..470db5612d 100644 --- a/modules/@angular/router/tsconfig.json +++ b/modules/@angular/router/tsconfig.json @@ -1,21 +1,24 @@ { "compilerOptions": { - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "noEmitOnError": false, - "module": "commonjs", - "target": "es5", - "noImplicitAny": true, - "noImplicitReturns": true, - "outDir": "dist", - "rootDir": ".", - "inlineSourceMap": true, - "inlineSources": true, + "baseUrl": ".", "declaration": true, - "removeComments": true + "stripInternal": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "module": "commonjs", + "moduleResolution": "node", + "outDir": "../../../dist/all/@angular/router/", + "paths": { + "@angular/*": ["../../../dist/all/@angular/*"] + }, + "rootDir": ".", + "sourceMap": true, + "inlineSources": true, + "lib": ["es6", "dom"], + "target": "es5" }, "files": [ - "src/index.ts", + "index.ts", "src/router.ts", "src/apply_redirects.ts", "src/recognize.ts", @@ -46,7 +49,7 @@ "test/create_url_tree.spec.ts", "test/config.spec.ts", "test/router.spec.ts", - "typings/index.d.ts" + "../../../node_modules/@types/jasmine/index.d.ts" ] } diff --git a/modules/@angular/router/tsconfig.publish.es5.json b/modules/@angular/router/tsconfig.publish.es5.json deleted file mode 100644 index 67cb080030..0000000000 --- a/modules/@angular/router/tsconfig.publish.es5.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "module": "commonjs", - "target": "es5", - "noImplicitAny": true, - "noImplicitReturns": true, - "outDir": "dist", - "rootDir": "src", - "inlineSourceMap": true, - "inlineSources": true, - "declaration": true, - "removeComments": true - }, - "files": [ - "src/index.ts", - "typings/index.d.ts" - ] -} diff --git a/modules/@angular/router/tsconfig.publish.esm.json b/modules/@angular/router/tsconfig.publish.esm.json deleted file mode 100644 index d3a4de9c90..0000000000 --- a/modules/@angular/router/tsconfig.publish.esm.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compilerOptions": { - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "target": "es6", - "noImplicitAny": true, - "noImplicitReturns": true, - "outDir": "dist/esm", - "rootDir": "src", - "inlineSourceMap": true, - "inlineSources": true, - "declaration": true, - "removeComments": true, - "moduleResolution": "node" - }, - "files": [ - "src/index.ts" - ] -} \ No newline at end of file diff --git a/modules/@angular/router/typings.json b/modules/@angular/router/typings.json deleted file mode 100644 index 7d6ad5bbcc..0000000000 --- a/modules/@angular/router/typings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "@angular/router", - "version": false, - "globalDependencies": { - "jasmine": "registry:dt/jasmine#2.2.0+20160505161446", - "es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#6697d6f7dadbf5773cb40ecda35a76027e0783b2" - } -} diff --git a/modules/tsconfig.json b/modules/tsconfig.json index 97c5135d60..ed4ebc1d47 100644 --- a/modules/tsconfig.json +++ b/modules/tsconfig.json @@ -28,6 +28,7 @@ "rollup-test", "upgrade-ts2dart.d.ts", "zone-ts2dart.d.ts", - "@angular/compiler-cli/integrationtest" + "@angular/compiler-cli/integrationtest", + "@angular/router" ] } diff --git a/scripts/ci-lite/build.sh b/scripts/ci-lite/build.sh index 3a24d80eb4..286233e1a2 100755 --- a/scripts/ci-lite/build.sh +++ b/scripts/ci-lite/build.sh @@ -13,5 +13,6 @@ $(npm bin)/tsc -v $(npm bin)/tsc -p tools cp tools/@angular/tsc-wrapped/package.json dist/tools/@angular/tsc-wrapped node dist/tools/@angular/tsc-wrapped/src/main -p modules +node dist/tools/@angular/tsc-wrapped/src/main -p modules/@angular/router echo 'travis_fold:end:BUILD' diff --git a/scripts/ci-lite/test_js.sh b/scripts/ci-lite/test_js.sh index a2d60810ac..7f0c22b123 100755 --- a/scripts/ci-lite/test_js.sh +++ b/scripts/ci-lite/test_js.sh @@ -43,6 +43,9 @@ if [[ ${TRAVIS} ]]; then fi $(npm bin)/karma start ./karma-js.conf.js --single-run --browsers=${KARMA_JS_BROWSERS} + +$(npm bin)/karma start ./modules/@angular/router/karma.conf.js --single-run --browsers=${KARMA_JS_BROWSERS} + echo 'travis_fold:end:test.unit.localChrome' diff --git a/tools/typings-test/test.sh b/tools/typings-test/test.sh index 6532d52b91..ef20426d38 100755 --- a/tools/typings-test/test.sh +++ b/tools/typings-test/test.sh @@ -3,7 +3,7 @@ set -ex -o pipefail # These ones can be `npm link`ed for fast development LINKABLE_PKGS=( - $(pwd)/dist/packages-dist/{common,core,compiler,compiler-cli,http,router-deprecated,upgrade,platform-{browser,browser-dynamic,server}} + $(pwd)/dist/packages-dist/{common,core,compiler,compiler-cli,http,router,router-deprecated,upgrade,platform-{browser,browser-dynamic,server}} ) TMPDIR=${TMPDIR:-/tmp/angular-build/}