diff --git a/build.sh b/build.sh index 99a571d1be..46ef0fd60d 100755 --- a/build.sh +++ b/build.sh @@ -113,28 +113,34 @@ containsElement () { # Arguments: # param1 - Base source folder # param2 - Destination directory +# param3 - Package name +# param4 - Is sub directory # Returns: # None ####################################### rollupIndex() { # Iterate over the files in this directory, rolling up each into ${2} directory - local regex=".+/(.+)/index.js" - in_file="${1}/index.js" - out_file="${2}/index.js" + in_file="${1}/${3}.js" + if [ ${4:-} ]; then + out_file="$(dropLast ${2})/${3}.js" + else + out_file="${2}/${3}.js" + fi BANNER_TEXT=`cat ${LICENSE_BANNER}` - if [[ -f ${in_file} ]]; then - echo "=========== $ROLLUP -i ${in_file} -o ${out_file} -c ${ROOT_DIR}/rollup.config.js --sourcemap" + echo "=========== $ROLLUP -i ${in_file} -o ${out_file} --sourcemap -f es --banner BANNER_TEXT >/dev/null 2>&1" $ROLLUP -i ${in_file} -o ${out_file} --sourcemap -f es --banner "$BANNER_TEXT" >/dev/null 2>&1 fi # Recurse for sub directories for DIR in ${1}/* ; do + local sub_package=$(basename "${DIR}") isIgnoredDirectory ${DIR} && continue - # NOTE: We need to re-run this regex and use the new match as Bash doesn't have closures - if [[ "${DIR}/index.js" =~ $regex ]]; then - rollupIndex ${DIR} ${2}/${BASH_REMATCH[1]} + local regex=".+/(.+)/${sub_package}.js" + if [[ "${DIR}/${sub_package}.js" =~ $regex ]]; then + + rollupIndex ${DIR} ${2}/${BASH_REMATCH[1]} ${sub_package} true fi done } @@ -218,8 +224,8 @@ compilePackage() { local package_name=$(basename "${2}") $NGC -p ${1}/tsconfig-build.json echo "====== Create ${1}/../${package_name}.d.ts re-export file for tsickle" - echo "$(cat ${LICENSE_BANNER}) ${N} export * from './${package_name}/index'" > ${2}/../${package_name}.d.ts - echo "{\"__symbolic\":\"module\",\"version\":3,\"metadata\":{},\"exports\":[{\"from\":\"./${package_name}/index\"}],\"flatModuleIndexRedirect\":true}" > ${2}/../${package_name}.metadata.json + echo "$(cat ${LICENSE_BANNER}) ${N} export * from './${package_name}/${package_name}'" > ${2}/../${package_name}.d.ts + echo "{\"__symbolic\":\"module\",\"version\":3,\"metadata\":{},\"exports\":[{\"from\":\"./${package_name}/${package_name}\"}],\"flatModuleIndexRedirect\":true}" > ${2}/../${package_name}.metadata.json fi for DIR in ${1}/* ; do @@ -265,10 +271,10 @@ compilePackageES5() { addNgcPackageJson() { for DIR in ${1}/* ; do [ -d "${DIR}" ] || continue - # Confirm there is an index.d.ts and index.metadata.json file. If so, create + # Confirm there is an ${PACKAGE}.d.ts and ${PACKAGE}.metadata.json file. If so, create # the package.json and recurse. - if [[ -f ${DIR}/index.d.ts && -f ${DIR}/index.metadata.json ]]; then - echo '{"typings": "index.d.ts"}' > ${DIR}/package.json + if [[ -f ${DIR}/${PACKAGE}.d.ts && -f ${DIR}/${PACKAGE}.metadata.json ]]; then + echo '{"typings": "${PACKAGE}.d.ts"}' > ${DIR}/package.json addNgcPackageJson ${DIR} fi done @@ -284,6 +290,25 @@ updateVersionReferences() { ) } +####################################### +# Drops the last entry of a path. Similar to normalizing a path such as +# /parent/child/.. to /parent. +# Arguments: +# param1 - Directory on which to drop the last item +# Returns: +# None +####################################### + +dropLast() { + local last_item=$(basename ${1}) + local regex=local regex="(.+)/${last_item}" + if [[ "${1}" =~ $regex ]]; then + echo "${BASH_REMATCH[1]}" + else + echo "${1}" + fi +} + VERSION="${VERSION_PREFIX}${VERSION_SUFFIX}" echo "====== BUILDING: Version ${VERSION}" @@ -394,7 +419,7 @@ do OUT_DIR=${ROOT_OUT_DIR}/${PACKAGE} OUT_DIR_ESM5=${ROOT_OUT_DIR}/${PACKAGE}/esm5 NPM_DIR=${PWD}/dist/packages-dist/${PACKAGE} - ESM15_DIR=${NPM_DIR}/esm15 + ESM2015_DIR=${NPM_DIR}/esm2015 ESM5_DIR=${NPM_DIR}/esm5 BUNDLES_DIR=${NPM_DIR}/bundles @@ -418,11 +443,11 @@ do ( cd ${SRC_DIR} echo "====== Rollup ${PACKAGE}" - rollupIndex ${OUT_DIR} ${ESM15_DIR} ${ROOT_DIR} + rollupIndex ${OUT_DIR} ${ESM2015_DIR} ${PACKAGE} echo "====== Produce ESM5 version" compilePackageES5 ${SRC_DIR} ${OUT_DIR_ESM5} ${PACKAGE} - rollupIndex ${OUT_DIR_ESM5} ${ESM5_DIR} ${ROOT_DIR} + rollupIndex ${OUT_DIR_ESM5} ${ESM5_DIR} ${PACKAGE} echo "====== Run rollup conversions on ${PACKAGE}" runRollup ${SRC_DIR} diff --git a/integration/hello_world__closure/closure.conf b/integration/hello_world__closure/closure.conf index ba4bd6e1f1..2c13c3b147 100644 --- a/integration/hello_world__closure/closure.conf +++ b/integration/hello_world__closure/closure.conf @@ -15,14 +15,14 @@ node_modules/zone.js/dist/zone_externs.js --js node_modules/rxjs/**.js --js node_modules/@angular/core/package.json ---js node_modules/@angular/core/esm15/index.js +--js node_modules/@angular/core/esm2015/core.js --js node_modules/@angular/core/src/testability/testability.externs.js --js node_modules/@angular/common/package.json ---js node_modules/@angular/common/esm15/index.js +--js node_modules/@angular/common/esm2015/common.js --js node_modules/@angular/platform-browser/package.json ---js node_modules/@angular/platform-browser/esm15/index.js +--js node_modules/@angular/platform-browser/esm2015/platform-browser.js --module_resolution=node --package_json_entry_names es2015 diff --git a/integration/i18n/closure.conf b/integration/i18n/closure.conf index 5d66c749e3..db6b8a772e 100644 --- a/integration/i18n/closure.conf +++ b/integration/i18n/closure.conf @@ -18,14 +18,14 @@ node_modules/zone.js/dist/zone_externs.js --package_json_entry_names es2015 --js node_modules/@angular/core/package.json ---js node_modules/@angular/core/esm15/index.js +--js node_modules/@angular/core/esm2015/core.js --js node_modules/@angular/core/src/testability/testability.externs.js --js node_modules/@angular/common/package.json ---js node_modules/@angular/common/esm15/index.js +--js node_modules/@angular/common/esm2015/common.js --js node_modules/@angular/platform-browser/package.json ---js node_modules/@angular/platform-browser/esm15/index.js +--js node_modules/@angular/platform-browser/esm2015/platform-browser.js --js built/**.js --entry_point=built/src/main diff --git a/packages/animations/browser/package.json b/packages/animations/browser/package.json index 85410894f5..880efc9afb 100644 --- a/packages/animations/browser/package.json +++ b/packages/animations/browser/package.json @@ -1,7 +1,7 @@ { "name": "@angular/animations/browser", - "typings": "./index.d.ts", + "typings": "./browser.d.ts", "main": "../bundles/animations-browser.umd.js", - "module": "../esm5/browser/index.js", - "es2015": "../esm15/browser/index.js" + "module": "../esm5/browser.js", + "es2015": "../esm2015/browser.js" } diff --git a/packages/animations/browser/rollup.config.js b/packages/animations/browser/rollup.config.js index 94d4133ff1..930c673326 100644 --- a/packages/animations/browser/rollup.config.js +++ b/packages/animations/browser/rollup.config.js @@ -16,7 +16,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/animations/esm5/browser/index.js', + entry: '../../../dist/packages-dist/animations/esm5/browser.js', dest: '../../../dist/packages-dist/animations/bundles/animations-browser.umd.js', format: 'umd', exports: 'named', diff --git a/packages/animations/browser/testing/package.json b/packages/animations/browser/testing/package.json index 173b8c5a57..78ab3c2f2d 100644 --- a/packages/animations/browser/testing/package.json +++ b/packages/animations/browser/testing/package.json @@ -1,7 +1,7 @@ { "name": "@angular/animations/browser/testing", - "typings": "./index.d.ts", + "typings": "./testing.d.ts", "main": "../../bundles/platform-browser-animations-testing.umd.js", - "module": "../../esm5/animations/testing/index.js", - "es2015": "../../esm15/animations/testing/index.js" + "module": "../../esm5/animations/testing.js", + "es2015": "../../esm2015/animations/testing.js" } diff --git a/packages/animations/browser/testing/rollup.config.js b/packages/animations/browser/testing/rollup.config.js index 04864d6044..22b3780a39 100644 --- a/packages/animations/browser/testing/rollup.config.js +++ b/packages/animations/browser/testing/rollup.config.js @@ -17,7 +17,7 @@ const globals = { }; export default { - entry: '../../../../dist/packages-dist/animations/esm5/browser/testing/index.js', + entry: '../../../../dist/packages-dist/animations/esm5/browser/testing.js', dest: '../../../../dist/packages-dist/animations/bundles/animations-browser-testing.umd.js', format: 'umd', exports: 'named', diff --git a/packages/animations/browser/testing/tsconfig-build.json b/packages/animations/browser/testing/tsconfig-build.json index 9d4e4b6f26..43fea50fe9 100644 --- a/packages/animations/browser/testing/tsconfig-build.json +++ b/packages/animations/browser/testing/tsconfig-build.json @@ -20,7 +20,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "testing.js", "flatModuleId": "@angular/animations/browser/testing" } } diff --git a/packages/animations/browser/tsconfig-build.json b/packages/animations/browser/tsconfig-build.json index 5765900012..4a40db325f 100644 --- a/packages/animations/browser/tsconfig-build.json +++ b/packages/animations/browser/tsconfig-build.json @@ -19,7 +19,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "browser.js", "flatModuleId": "@angular/animations/browser" } } diff --git a/packages/animations/package.json b/packages/animations/package.json index 0de5289fc1..278211f675 100644 --- a/packages/animations/package.json +++ b/packages/animations/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - animations integration with web-animationss", "main": "./bundles/animations.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/animations.js", + "es2015": "./esm2015/animations.js", + "typings": "./animations.d.ts", "author": "angular", "license": "MIT", "dependencies": { diff --git a/packages/animations/rollup.config.js b/packages/animations/rollup.config.js index 4807c7f73c..a488d514ce 100644 --- a/packages/animations/rollup.config.js +++ b/packages/animations/rollup.config.js @@ -17,7 +17,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/animations/esm5/index.js', + entry: '../../dist/packages-dist/animations/esm5/animations.js', dest: '../../dist/packages-dist/animations/bundles/animations.umd.js', format: 'umd', exports: 'named', diff --git a/packages/animations/tsconfig-build.json b/packages/animations/tsconfig-build.json index 4811cc8194..3cd90e155c 100644 --- a/packages/animations/tsconfig-build.json +++ b/packages/animations/tsconfig-build.json @@ -17,7 +17,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "animations.js", "flatModuleId": "@angular/animations" } } diff --git a/packages/common/http/package.json b/packages/common/http/package.json index 8377c622ac..68ca9e6410 100644 --- a/packages/common/http/package.json +++ b/packages/common/http/package.json @@ -1,7 +1,7 @@ { "name": "@angular/common/http", - "typings": "./index.d.ts", + "typings": "./http.d.ts", "main": "../bundles/common-http.umd.js", - "module": "../esm5/http/index.js", - "es2015": "../esm15/http/index.js" + "module": "../esm5/http.js", + "es2015": "../esm2015/http.js" } diff --git a/packages/common/http/rollup.config.js b/packages/common/http/rollup.config.js index 07dc144f2c..4f26655bc1 100644 --- a/packages/common/http/rollup.config.js +++ b/packages/common/http/rollup.config.js @@ -21,7 +21,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/common/esm5/http/index.js', + entry: '../../../dist/packages-dist/common/esm5/http.js', dest: '../../../dist/packages-dist/common/bundles/common-http.umd.js', format: 'umd', exports: 'named', diff --git a/packages/common/http/testing/package.json b/packages/common/http/testing/package.json index 4fd1762c30..4cac2fafac 100644 --- a/packages/common/http/testing/package.json +++ b/packages/common/http/testing/package.json @@ -1,7 +1,7 @@ { "name": "@angular/common/http/testing", - "typings": "./index.d.ts", + "typings": "./testing.d.ts", "main": "../../bundles/common-http-testing.umd.js", - "module": "../../esm5/http/testing/index.js", - "es2015": "../../esm15/http/testing/index.js" + "module": "../../esm5/http/testing.js", + "es2015": "../../esm2015/http/testing.js" } diff --git a/packages/common/http/testing/rollup.config.js b/packages/common/http/testing/rollup.config.js index 8d97a52294..4f5156eeb0 100644 --- a/packages/common/http/testing/rollup.config.js +++ b/packages/common/http/testing/rollup.config.js @@ -20,7 +20,7 @@ const globals = { }; export default { - entry: '../../../../dist/packages-dist/common/esm5/http/testing/index.js', + entry: '../../../../dist/packages-dist/common/esm5/http/testing.js', dest: '../../../../dist/packages-dist/common/bundles/common-http-testing.umd.js', format: 'umd', exports: 'named', diff --git a/packages/common/http/testing/tsconfig-build.json b/packages/common/http/testing/tsconfig-build.json index 9aa3342c06..a90a2fbaa1 100644 --- a/packages/common/http/testing/tsconfig-build.json +++ b/packages/common/http/testing/tsconfig-build.json @@ -20,7 +20,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "testing.js", "flatModuleId": "@angular/common/http/testing" } } diff --git a/packages/common/http/tsconfig-build.json b/packages/common/http/tsconfig-build.json index 0607fea461..1c804b0539 100644 --- a/packages/common/http/tsconfig-build.json +++ b/packages/common/http/tsconfig-build.json @@ -18,7 +18,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "http.js", "flatModuleId": "@angular/common/http" } } diff --git a/packages/common/package.json b/packages/common/package.json index 8e2bc97cd4..7ac1039b37 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - commonly needed directives and services", "main": "./bundles/common.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/common.js", + "es2015": "./esm2015/common.js", + "typings": "./common.d.ts", "author": "angular", "license": "MIT", "dependencies": { diff --git a/packages/common/rollup.config.js b/packages/common/rollup.config.js index a2b3c47dc8..729fec2e19 100644 --- a/packages/common/rollup.config.js +++ b/packages/common/rollup.config.js @@ -16,7 +16,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/common/esm5/index.js', + entry: '../../dist/packages-dist/common/esm5/common.js', dest: '../../dist/packages-dist/common/bundles/common.umd.js', format: 'umd', exports: 'named', diff --git a/packages/common/testing/package.json b/packages/common/testing/package.json index 977b45fa0d..0c22af255d 100644 --- a/packages/common/testing/package.json +++ b/packages/common/testing/package.json @@ -1,7 +1,7 @@ { "name": "@angular/common/testing", - "typings": "./index.d.ts", + "typings": "./testing.d.ts", "main": "../bundles/common-testing.umd.js", - "module": "../esm5/testing/index.js", - "es2015": "../esm15/testing/index.js" + "module": "../esm5/testing.js", + "es2015": "../esm2015/testing.js" } diff --git a/packages/common/testing/rollup.config.js b/packages/common/testing/rollup.config.js index c6f4faa7a2..e8c9832667 100644 --- a/packages/common/testing/rollup.config.js +++ b/packages/common/testing/rollup.config.js @@ -17,7 +17,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/common/esm5/testing/index.js', + entry: '../../../dist/packages-dist/common/esm5/testing.js', dest: '../../../dist/packages-dist/common/bundles/common-testing.umd.js', format: 'umd', exports: 'named', diff --git a/packages/common/testing/tsconfig-build.json b/packages/common/testing/tsconfig-build.json index bf9446dac1..840b54605e 100644 --- a/packages/common/testing/tsconfig-build.json +++ b/packages/common/testing/tsconfig-build.json @@ -19,7 +19,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "testing.js", "flatModuleId": "@angular/common/testing" } } diff --git a/packages/common/tsconfig-build.json b/packages/common/tsconfig-build.json index e36be180bf..38d55d26c0 100644 --- a/packages/common/tsconfig-build.json +++ b/packages/common/tsconfig-build.json @@ -18,7 +18,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "common.js", "flatModuleId": "@angular/common" } } diff --git a/packages/compiler-cli/integrationtest/test/basic_spec.ts b/packages/compiler-cli/integrationtest/test/basic_spec.ts index 2aa203efd8..370585521e 100644 --- a/packages/compiler-cli/integrationtest/test/basic_spec.ts +++ b/packages/compiler-cli/integrationtest/test/basic_spec.ts @@ -37,7 +37,7 @@ describe('template codegen output', () => { }); it('should write .ngfactory.js for .d.ts inputs', () => { - const factoryOutput = path.join('node_modules', '@angular', 'common', 'index.ngfactory.js'); + const factoryOutput = path.join('node_modules', '@angular', 'common', 'common.ngfactory.js'); expect(fs.existsSync(factoryOutput)).toBeTruthy(); }); diff --git a/packages/compiler/compiler.ts b/packages/compiler/compiler.ts new file mode 100644 index 0000000000..e727e2e8a7 --- /dev/null +++ b/packages/compiler/compiler.ts @@ -0,0 +1,14 @@ +/** + * @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 is not used to build this module. It is only used during editing +// by the TypeScript language service and during build for verification. `ngc` +// replaces this file with production index.ts when it rewrites private symbol +// names. + +export * from './public_api'; diff --git a/packages/compiler/index.ts b/packages/compiler/index.ts index e727e2e8a7..da6c41adee 100644 --- a/packages/compiler/index.ts +++ b/packages/compiler/index.ts @@ -11,4 +11,4 @@ // replaces this file with production index.ts when it rewrites private symbol // names. -export * from './public_api'; +export * from './compiler'; diff --git a/packages/compiler/package.json b/packages/compiler/package.json index 9706f4ab7c..f94e61dcaa 100644 --- a/packages/compiler/package.json +++ b/packages/compiler/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - the compiler library", "main": "./bundles/compiler.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/compiler.js", + "es2015": "./esm2015/compiler.js", + "typings": "./compiler.d.ts", "author": "angular", "license": "MIT", "dependencies": { diff --git a/packages/compiler/rollup.config.js b/packages/compiler/rollup.config.js index 828c3672d6..e7490ccc44 100644 --- a/packages/compiler/rollup.config.js +++ b/packages/compiler/rollup.config.js @@ -16,7 +16,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/compiler/esm5/index.js', + entry: '../../dist/packages-dist/compiler/esm5/compiler.js', dest: '../../dist/packages-dist/compiler/bundles/compiler.umd.js', format: 'umd', exports: 'named', diff --git a/packages/compiler/testing/package.json b/packages/compiler/testing/package.json index b00581c39e..1ca17df62c 100644 --- a/packages/compiler/testing/package.json +++ b/packages/compiler/testing/package.json @@ -1,7 +1,7 @@ { "name": "@angular/compiler/testing", - "typings": "./index.d.ts", + "typings": "./testing.d.ts", "main": "../bundles/compiler-testing.umd.js", - "module": "../esm5/testing/index.js", - "es2015": "../esm15/testing/index.js" + "module": "../esm5/testing.js", + "es2015": "../esm2015/testing.js" } diff --git a/packages/compiler/testing/rollup.config.js b/packages/compiler/testing/rollup.config.js index c01eb041df..0d2fb58191 100644 --- a/packages/compiler/testing/rollup.config.js +++ b/packages/compiler/testing/rollup.config.js @@ -18,7 +18,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/compiler/esm5/testing/index.js', + entry: '../../../dist/packages-dist/compiler/esm5/testing.js', dest: '../../../dist/packages-dist/compiler/bundles/compiler-testing.umd.js', format: 'umd', exports: 'named', diff --git a/packages/compiler/testing/tsconfig-build.json b/packages/compiler/testing/tsconfig-build.json index 0b905f6998..1fbc333d5c 100644 --- a/packages/compiler/testing/tsconfig-build.json +++ b/packages/compiler/testing/tsconfig-build.json @@ -17,7 +17,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "testing.js", "flatModuleId": "@angular/compiler/testing" } } diff --git a/packages/core/package.json b/packages/core/package.json index 846b2a892b..5755adaff8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - the core framework", "main": "./bundles/core.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/core.js", + "es2015": "./esm2015/core.js", + "typings": "./core.d.ts", "author": "angular", "license": "MIT", "dependencies": { diff --git a/packages/core/rollup.config.js b/packages/core/rollup.config.js index 01068dd574..6038c3b22c 100644 --- a/packages/core/rollup.config.js +++ b/packages/core/rollup.config.js @@ -19,7 +19,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/core/esm5/index.js', + entry: '../../dist/packages-dist/core/esm5/core.js', dest: '../../dist/packages-dist/core/bundles/core.umd.js', format: 'umd', exports: 'named', diff --git a/packages/core/testing/package.json b/packages/core/testing/package.json index 2a51fb65a1..cb80445ac0 100644 --- a/packages/core/testing/package.json +++ b/packages/core/testing/package.json @@ -1,7 +1,7 @@ { "name": "@angular/core/testing", - "typings": "./index.d.ts", + "typings": "./testing.d.ts", "main": "../bundles/core-testing.umd.js", - "module": "../esm5/testing/index.js", - "es2015": "../esm15/testing/index.js" + "module": "../esm5/testing.js", + "es2015": "../esm2015/testing.js" } diff --git a/packages/core/testing/rollup.config.js b/packages/core/testing/rollup.config.js index c3800a361c..b1974deadd 100644 --- a/packages/core/testing/rollup.config.js +++ b/packages/core/testing/rollup.config.js @@ -16,7 +16,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/core/esm5/testing/index.js', + entry: '../../../dist/packages-dist/core/esm5/testing.js', dest: '../../../dist/packages-dist/core/bundles/core-testing.umd.js', format: 'umd', exports: 'named', diff --git a/packages/core/testing/tsconfig-build.json b/packages/core/testing/tsconfig-build.json index ac8527d4c1..c3fb9a5521 100644 --- a/packages/core/testing/tsconfig-build.json +++ b/packages/core/testing/tsconfig-build.json @@ -19,7 +19,7 @@ "angularCompilerOptions": { "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "testing.js", "flatModuleId": "@angular/core/testing" } } diff --git a/packages/core/tsconfig-build.json b/packages/core/tsconfig-build.json index 6339f97757..62df311949 100644 --- a/packages/core/tsconfig-build.json +++ b/packages/core/tsconfig-build.json @@ -19,7 +19,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "core.js", "flatModuleId": "@angular/core" } } \ No newline at end of file diff --git a/packages/forms/package.json b/packages/forms/package.json index 658c18603a..5f6a4e4fbd 100644 --- a/packages/forms/package.json +++ b/packages/forms/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - directives and services for creating forms", "main": "./bundles/forms.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/forms.js", + "es2015": "./esm2015/forms.js", + "typings": "./forms.d.ts", "author": "angular", "license": "MIT", "dependencies": { diff --git a/packages/forms/rollup.config.js b/packages/forms/rollup.config.js index 9e5edec6dc..a8a7c6adb2 100644 --- a/packages/forms/rollup.config.js +++ b/packages/forms/rollup.config.js @@ -22,7 +22,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/forms/esm5/index.js', + entry: '../../dist/packages-dist/forms/esm5/forms.js', dest: '../../dist/packages-dist/forms/bundles/forms.umd.js', format: 'umd', exports: 'named', diff --git a/packages/forms/tsconfig-build.json b/packages/forms/tsconfig-build.json index 2a8dfb69bc..cd1a0b1ec3 100644 --- a/packages/forms/tsconfig-build.json +++ b/packages/forms/tsconfig-build.json @@ -24,7 +24,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "forms.js", "flatModuleId": "@angular/forms" } } diff --git a/packages/http/package.json b/packages/http/package.json index 0175f4f574..689c504056 100644 --- a/packages/http/package.json +++ b/packages/http/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - the http service", "main": "./bundles/http.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/http.js", + "es2015": "./esm2015/http.js", + "typings": "./http.d.ts", "author": "angular", "license": "MIT", "dependencies": { diff --git a/packages/http/rollup.config.js b/packages/http/rollup.config.js index 8561d1dd70..7b67d474b9 100644 --- a/packages/http/rollup.config.js +++ b/packages/http/rollup.config.js @@ -18,7 +18,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/http/esm5/index.js', + entry: '../../dist/packages-dist/http/esm5/http.js', dest: '../../dist/packages-dist/http/bundles/http.umd.js', format: 'umd', exports: 'named', diff --git a/packages/http/testing/package.json b/packages/http/testing/package.json index e1f897ca63..30be866e5b 100644 --- a/packages/http/testing/package.json +++ b/packages/http/testing/package.json @@ -1,7 +1,7 @@ { "name": "@angular/http/testing", - "typings": "./index.d.ts", + "typings": "./testing.d.ts", "main": "../bundles/http-testing.umd.js", - "module": "../esm5/testing/index.js", - "es2015": "../esm15/testing/index.js" + "module": "../esm5/testing.js", + "es2015": "../esm2015/testing.js" } diff --git a/packages/http/testing/rollup.config.js b/packages/http/testing/rollup.config.js index 2b6a7b9841..cc21db3b1a 100644 --- a/packages/http/testing/rollup.config.js +++ b/packages/http/testing/rollup.config.js @@ -21,7 +21,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/http/esm5/testing/index.js', + entry: '../../../dist/packages-dist/http/esm5/testing.js', dest: '../../../dist/packages-dist/http/bundles/http-testing.umd.js', format: 'umd', exports: 'named', diff --git a/packages/http/testing/tsconfig-build.json b/packages/http/testing/tsconfig-build.json index 70d365a6f7..4043e93200 100644 --- a/packages/http/testing/tsconfig-build.json +++ b/packages/http/testing/tsconfig-build.json @@ -19,7 +19,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "testing.js", "flatModuleId": "@angular/http/testing" } } diff --git a/packages/http/tsconfig-build.json b/packages/http/tsconfig-build.json index e0736b5699..7426f25c1b 100644 --- a/packages/http/tsconfig-build.json +++ b/packages/http/tsconfig-build.json @@ -20,7 +20,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "http.js", "flatModuleId": "@angular/http" } } diff --git a/packages/language-service/index.ts b/packages/language-service/index.ts index 4e0fc2b3be..f258660ce2 100644 --- a/packages/language-service/index.ts +++ b/packages/language-service/index.ts @@ -6,13 +6,4 @@ * found in the LICENSE file at https://angular.io/license */ -/** - * @module - * @description - * Entry point for all public APIs of the language service package. - */ -export {createLanguageService} from './src/language_service'; -export * from './src/ts_plugin'; -export {Completion, Completions, Declaration, Declarations, Definition, Diagnostic, Diagnostics, Hover, HoverTextSection, LanguageService, LanguageServiceHost, Location, Span, TemplateSource, TemplateSources} from './src/types'; -export {TypeScriptServiceHost, createLanguageServiceFromTypescript} from './src/typescript_host'; -export {VERSION} from './src/version'; +export * from './language-service'; diff --git a/packages/language-service/language-service.ts b/packages/language-service/language-service.ts new file mode 100644 index 0000000000..4e0fc2b3be --- /dev/null +++ b/packages/language-service/language-service.ts @@ -0,0 +1,18 @@ +/** + * @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 + */ + +/** + * @module + * @description + * Entry point for all public APIs of the language service package. + */ +export {createLanguageService} from './src/language_service'; +export * from './src/ts_plugin'; +export {Completion, Completions, Declaration, Declarations, Definition, Diagnostic, Diagnostics, Hover, HoverTextSection, LanguageService, LanguageServiceHost, Location, Span, TemplateSource, TemplateSources} from './src/types'; +export {TypeScriptServiceHost, createLanguageServiceFromTypescript} from './src/typescript_host'; +export {VERSION} from './src/version'; diff --git a/packages/language-service/package.json b/packages/language-service/package.json index 55f269d611..8776c2d723 100644 --- a/packages/language-service/package.json +++ b/packages/language-service/package.json @@ -3,8 +3,8 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - language services", "main": "./bundles/language-service.umd.js", - "module": "./esm5/index.js", - "typings": "./index.d.ts", + "module": "./esm5/language-service.js", + "typings": "./language-service.d.ts", "author": "angular", "license": "MIT", "repository": { diff --git a/packages/language-service/rollup.config.js b/packages/language-service/rollup.config.js index 99e03e3590..23822d0030 100644 --- a/packages/language-service/rollup.config.js +++ b/packages/language-service/rollup.config.js @@ -40,9 +40,7 @@ function resolve(id, from) { 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 + '/esm5/' + - 'index.js'; - // console.log('** ANGULAR MAPPED **: ', r); + loc + packageName + '/esm5/' + packageName + '.js'; return r; } if (id && id.startsWith('rxjs/')) { @@ -71,7 +69,7 @@ module.exports = function(provided) { `; export default { - entry: '../../dist/packages-dist/language-service/esm5/index.js', + entry: '../../dist/packages-dist/language-service/esm5/language-service.js', dest: '../../dist/packages-dist/language-service/bundles/language-service.umd.js', format: 'amd', moduleName: 'ng.language_service', diff --git a/packages/platform-browser-dynamic/package.json b/packages/platform-browser-dynamic/package.json index 03d36e73d1..cba46009cc 100644 --- a/packages/platform-browser-dynamic/package.json +++ b/packages/platform-browser-dynamic/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - library for using Angular in a web browser with JIT compilation", "main": "./bundles/platform-browser-dynamic.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/platform-browser-dynamic.js", + "es2015": "./esm2015/platform-browser-dynamic.js", + "typings": "./platform-browser-dynamic.d.ts", "author": "angular", "license": "MIT", "dependencies": { diff --git a/packages/platform-browser-dynamic/rollup.config.js b/packages/platform-browser-dynamic/rollup.config.js index bbc85c62c8..7c1e9e6071 100644 --- a/packages/platform-browser-dynamic/rollup.config.js +++ b/packages/platform-browser-dynamic/rollup.config.js @@ -17,7 +17,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/platform-browser-dynamic/esm5/index.js', + entry: '../../dist/packages-dist/platform-browser-dynamic/esm5/platform-browser-dynamic.js', dest: '../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', format: 'umd', exports: 'named', diff --git a/packages/platform-browser-dynamic/testing/package.json b/packages/platform-browser-dynamic/testing/package.json index 20df30f566..7e2a4e1ae6 100644 --- a/packages/platform-browser-dynamic/testing/package.json +++ b/packages/platform-browser-dynamic/testing/package.json @@ -1,7 +1,7 @@ { "name": "@angular/platform-browser-dynamic/testing", - "typings": "./index.d.ts", + "typings": "./testing.d.ts", "main": "../bundles/platform-browser-dynamic-testing.umd.js", - "module": "../esm5/testing/index.js", - "es2015": "../esm15/testing/index.js" + "module": "../esm5/testing.js", + "es2015": "../esm2015/testing.js" } diff --git a/packages/platform-browser-dynamic/testing/rollup.config.js b/packages/platform-browser-dynamic/testing/rollup.config.js index 7eedcafb50..2e5ad8eaa4 100644 --- a/packages/platform-browser-dynamic/testing/rollup.config.js +++ b/packages/platform-browser-dynamic/testing/rollup.config.js @@ -21,7 +21,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/platform-browser-dynamic/esm5/testing/index.js', + entry: '../../../dist/packages-dist/platform-browser-dynamic/esm5/testing.js', dest: '../../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js', format: 'umd', diff --git a/packages/platform-browser-dynamic/testing/tsconfig-build.json b/packages/platform-browser-dynamic/testing/tsconfig-build.json index 4229ad63c8..9affe5bfca 100644 --- a/packages/platform-browser-dynamic/testing/tsconfig-build.json +++ b/packages/platform-browser-dynamic/testing/tsconfig-build.json @@ -27,7 +27,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "testing.js", "flatModuleId": "@angular/platform-browser-dynamic/testing" } } diff --git a/packages/platform-browser-dynamic/tsconfig-build.json b/packages/platform-browser-dynamic/tsconfig-build.json index 5b541d4b48..789f38a871 100644 --- a/packages/platform-browser-dynamic/tsconfig-build.json +++ b/packages/platform-browser-dynamic/tsconfig-build.json @@ -26,7 +26,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "platform-browser-dynamic.js", "flatModuleId": "@angular/platform-browser-dynamic" } } diff --git a/packages/platform-browser/animations/package.json b/packages/platform-browser/animations/package.json index 372f01a5f2..e3e9257753 100644 --- a/packages/platform-browser/animations/package.json +++ b/packages/platform-browser/animations/package.json @@ -1,7 +1,7 @@ { "name": "@angular/platform-browser/animations", - "typings": "./index.d.ts", + "typings": "./animations.d.ts", "main": "../bundles/platform-browser-animations.umd.js", - "module": "../esm5/animations/index.js", - "es2015": "../esm15/animations/index.js" + "module": "../esm5/animations.js", + "es2015": "../esm2015/animations.js" } diff --git a/packages/platform-browser/animations/rollup.config.js b/packages/platform-browser/animations/rollup.config.js index a69c54c32e..b5c4fc8397 100644 --- a/packages/platform-browser/animations/rollup.config.js +++ b/packages/platform-browser/animations/rollup.config.js @@ -18,7 +18,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/platform-browser/esm5/animations/index.js', + entry: '../../../dist/packages-dist/platform-browser/esm5/animations.js', dest: '../../../dist/packages-dist/platform-browser/bundles/platform-browser-animations.umd.js', format: 'umd', exports: 'named', diff --git a/packages/platform-browser/animations/tsconfig-build.json b/packages/platform-browser/animations/tsconfig-build.json index f3971a9ded..047c7c2bda 100644 --- a/packages/platform-browser/animations/tsconfig-build.json +++ b/packages/platform-browser/animations/tsconfig-build.json @@ -24,7 +24,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "animations.js", "flatModuleId": "@angular/platform-browser/animations" } } diff --git a/packages/platform-browser/package.json b/packages/platform-browser/package.json index 26a6194517..4b3574cb82 100644 --- a/packages/platform-browser/package.json +++ b/packages/platform-browser/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - library for using Angular in a web browser", "main": "./bundles/platform-browser.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/platform-browser.js", + "es2015": "./esm2015/platform-browser.js", + "typings": "./platform-browser.d.ts", "author": "angular", "license": "MIT", "dependencies": { diff --git a/packages/platform-browser/rollup.config.js b/packages/platform-browser/rollup.config.js index e02965dd66..a8b70b86b8 100644 --- a/packages/platform-browser/rollup.config.js +++ b/packages/platform-browser/rollup.config.js @@ -15,7 +15,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/platform-browser/esm5/index.js', + entry: '../../dist/packages-dist/platform-browser/esm5/platform-browser.js', dest: '../../dist/packages-dist/platform-browser/bundles/platform-browser.umd.js', format: 'umd', exports: 'named', diff --git a/packages/platform-browser/testing/package.json b/packages/platform-browser/testing/package.json index 8ba0ddc383..3b288588ed 100644 --- a/packages/platform-browser/testing/package.json +++ b/packages/platform-browser/testing/package.json @@ -1,7 +1,7 @@ { "name": "@angular/platform-browser/testing", - "typings": "./index.d.ts", + "typings": "./testing.d.ts", "main": "../bundles/platform-browser-testing.umd.js", - "module": "../esm5/testing/index.js", - "es2015": "../esm15/testing/index.js" + "module": "../esm5/testing.js", + "es2015": "../esm2015/testing.js" } diff --git a/packages/platform-browser/testing/rollup.config.js b/packages/platform-browser/testing/rollup.config.js index 6ac995d3f5..9b91fdb51e 100644 --- a/packages/platform-browser/testing/rollup.config.js +++ b/packages/platform-browser/testing/rollup.config.js @@ -16,7 +16,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/platform-browser/esm5/testing/index.js', + entry: '../../../dist/packages-dist/platform-browser/esm5/testing.js', dest: '../../../dist/packages-dist/platform-browser/bundles/platform-browser-testing.umd.js', format: 'umd', exports: 'named', diff --git a/packages/platform-browser/testing/tsconfig-build.json b/packages/platform-browser/testing/tsconfig-build.json index daf21048a5..03f2b5bf14 100644 --- a/packages/platform-browser/testing/tsconfig-build.json +++ b/packages/platform-browser/testing/tsconfig-build.json @@ -24,7 +24,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "testing.js", "flatModuleId": "@angular/platform-browser/testing" } } diff --git a/packages/platform-browser/tsconfig-build.json b/packages/platform-browser/tsconfig-build.json index fa09e65722..dd0a58f6b8 100644 --- a/packages/platform-browser/tsconfig-build.json +++ b/packages/platform-browser/tsconfig-build.json @@ -21,7 +21,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "platform-browser.js", "flatModuleId": "@angular/platform-browser" } } diff --git a/packages/platform-server/package.json b/packages/platform-server/package.json index 2899a0afc1..cb83c207b5 100644 --- a/packages/platform-server/package.json +++ b/packages/platform-server/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - library for using Angular in Node.js", "main": "./bundles/platform-server.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/platform-server.js", + "es2015": "./esm2015/platform-server.js", + "typings": "./platform-server.d.ts", "author": "angular", "license": "MIT", "peerDependencies": { diff --git a/packages/platform-server/rollup.config.js b/packages/platform-server/rollup.config.js index ba9447319c..147f071a5d 100644 --- a/packages/platform-server/rollup.config.js +++ b/packages/platform-server/rollup.config.js @@ -22,7 +22,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/platform-server/esm5/index.js', + entry: '../../dist/packages-dist/platform-server/esm5/platform-server.js', dest: '../../dist/packages-dist/platform-server/bundles/platform-server.umd.js', format: 'umd', exports: 'named', diff --git a/packages/platform-server/testing/package.json b/packages/platform-server/testing/package.json index 845de15bc2..62b1261183 100644 --- a/packages/platform-server/testing/package.json +++ b/packages/platform-server/testing/package.json @@ -1,7 +1,7 @@ { "name": "@angular/platform-server/testing", - "typings": "./index.d.ts", + "typings": "./testing.d.ts", "main": "../bundles/platform-server-testing.umd.js", - "module": "../esm5/testing/index.js", - "es2015": "../esm15/testing/index.js" + "module": "../esm5/testing.js", + "es2015": "../esm2015/testing.js" } diff --git a/packages/platform-server/testing/rollup.config.js b/packages/platform-server/testing/rollup.config.js index a0db9f952f..7e4b99b4df 100644 --- a/packages/platform-server/testing/rollup.config.js +++ b/packages/platform-server/testing/rollup.config.js @@ -20,7 +20,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/platform-server/esm5/testing/index.js', + entry: '../../../dist/packages-dist/platform-server/esm5/testing.js', dest: '../../../dist/packages-dist/platform-server/bundles/platform-server-testing.umd.js', format: 'umd', exports: 'named', diff --git a/packages/platform-server/testing/tsconfig-build.json b/packages/platform-server/testing/tsconfig-build.json index d644b0eea4..1637daad7b 100644 --- a/packages/platform-server/testing/tsconfig-build.json +++ b/packages/platform-server/testing/tsconfig-build.json @@ -32,7 +32,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "testing.js", "flatModuleId": "@angular/platform-server/testing" } } diff --git a/packages/platform-server/tsconfig-build.json b/packages/platform-server/tsconfig-build.json index 4580c4df35..9a3c1ae7d7 100644 --- a/packages/platform-server/tsconfig-build.json +++ b/packages/platform-server/tsconfig-build.json @@ -27,7 +27,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "platform-server.js", "flatModuleId": "@angular/platform-server" } } diff --git a/packages/platform-webworker-dynamic/package.json b/packages/platform-webworker-dynamic/package.json index 668b56cb30..5a10203e7b 100644 --- a/packages/platform-webworker-dynamic/package.json +++ b/packages/platform-webworker-dynamic/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - library for using Angular in a web browser with web workers", "main": "./bundles/platform-webworker-dynamic.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/platform-webworker-dynamic.js", + "es2015": "./esm2015/platform-webworker-dynamic.js", + "typings": "./platform-webworker-dynamic.d.ts", "author": "angular", "license": "MIT", "dependencies": { diff --git a/packages/platform-webworker-dynamic/rollup.config.js b/packages/platform-webworker-dynamic/rollup.config.js index 791c743f8b..d9f5d5e161 100644 --- a/packages/platform-webworker-dynamic/rollup.config.js +++ b/packages/platform-webworker-dynamic/rollup.config.js @@ -19,7 +19,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/platform-webworker-dynamic/esm5/index.js', + entry: '../../dist/packages-dist/platform-webworker-dynamic/esm5/platform-webworker-dynamic.js', dest: '../../dist/packages-dist/platform-webworker-dynamic/bundles/platform-webworker-dynamic.umd.js', format: 'umd', diff --git a/packages/platform-webworker-dynamic/tsconfig-build.json b/packages/platform-webworker-dynamic/tsconfig-build.json index 8e4b0f37b6..59349d77db 100644 --- a/packages/platform-webworker-dynamic/tsconfig-build.json +++ b/packages/platform-webworker-dynamic/tsconfig-build.json @@ -23,7 +23,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "platform-webworker-dynamic.js", "flatModuleId": "@angular/platform-webworker-dynamic" } } diff --git a/packages/platform-webworker/package.json b/packages/platform-webworker/package.json index 4efb426d10..e3f8ae9803 100644 --- a/packages/platform-webworker/package.json +++ b/packages/platform-webworker/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - library for using Angular in a web browser with web workers", "main": "./bundles/platform-webworker.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/platform-webworker.js", + "es2015": "./esm2015/platform-webworker.js", + "typings": "./platform-webworker.d.ts", "author": "angular", "license": "MIT", "dependencies": { diff --git a/packages/platform-webworker/rollup.config.js b/packages/platform-webworker/rollup.config.js index 458dbc3844..780d937363 100644 --- a/packages/platform-webworker/rollup.config.js +++ b/packages/platform-webworker/rollup.config.js @@ -18,7 +18,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/platform-webworker/esm5/index.js', + entry: '../../dist/packages-dist/platform-webworker/esm5/platform-webworker.js', dest: '../../dist/packages-dist/platform-webworker/bundles/platform-webworker.umd.js', format: 'umd', exports: 'named', diff --git a/packages/platform-webworker/tsconfig-build.json b/packages/platform-webworker/tsconfig-build.json index 07d0bee6f3..1410b58754 100644 --- a/packages/platform-webworker/tsconfig-build.json +++ b/packages/platform-webworker/tsconfig-build.json @@ -20,7 +20,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "platform-webworker.js", "flatModuleId": "@angular/platform-webworker" } } diff --git a/packages/router/package.json b/packages/router/package.json index 248697d3d3..37dd7f2c51 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - the routing library", "main": "./bundles/router.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/router.js", + "es2015": "./esm2015/router.js", + "typings": "./router.d.ts", "keywords": [ "angular", "router" diff --git a/packages/router/rollup.config.js b/packages/router/rollup.config.js index 1289487f08..58090e5f5e 100644 --- a/packages/router/rollup.config.js +++ b/packages/router/rollup.config.js @@ -40,7 +40,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/router/esm5/index.js', + entry: '../../dist/packages-dist/router/esm5/router.js', dest: '../../dist/packages-dist/router/bundles/router.umd.js', format: 'umd', exports: 'named', diff --git a/packages/router/testing/package.json b/packages/router/testing/package.json index c9b461a5dd..84d5d64a69 100644 --- a/packages/router/testing/package.json +++ b/packages/router/testing/package.json @@ -1,7 +1,7 @@ { "name": "@angular/router/testing", - "typings": "./index.d.ts", + "typings": "./testing.d.ts", "main": "../bundles/router-testing.umd.js", - "module": "../esm5/testing/index.js", - "es2015": "../esm15/testing/index.js" + "module": "../esm5/testing.js", + "es2015": "../esm2015/testing.js" } diff --git a/packages/router/testing/rollup.config.js b/packages/router/testing/rollup.config.js index 53962e114f..d3bdcbed4e 100644 --- a/packages/router/testing/rollup.config.js +++ b/packages/router/testing/rollup.config.js @@ -18,7 +18,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/router/esm5/testing/index.js', + entry: '../../../dist/packages-dist/router/esm5/testing.js', dest: '../../../dist/packages-dist/router/bundles/router-testing.umd.js', format: 'umd', exports: 'named', diff --git a/packages/router/testing/tsconfig-build.json b/packages/router/testing/tsconfig-build.json index c34bed8f75..a3a8615973 100644 --- a/packages/router/testing/tsconfig-build.json +++ b/packages/router/testing/tsconfig-build.json @@ -21,7 +21,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "testing.js", "flatModuleId": "@angular/router/testing" } } diff --git a/packages/router/tsconfig-build.json b/packages/router/tsconfig-build.json index 42c94892ba..34529dac95 100644 --- a/packages/router/tsconfig-build.json +++ b/packages/router/tsconfig-build.json @@ -20,7 +20,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "router.js", "flatModuleId": "@angular/router" } } diff --git a/packages/router/upgrade/package.json b/packages/router/upgrade/package.json index 053c8a8d24..d0a8ff2847 100644 --- a/packages/router/upgrade/package.json +++ b/packages/router/upgrade/package.json @@ -1,7 +1,7 @@ { "name": "@angular/router/upgrade", - "typings": "./index.d.ts", + "typings": "./upgrade.d.ts", "main": "../bundles/router-upgrade.umd.js", - "module": "../esm5/upgrade/index.js", - "es2015": "../esm15/upgrade/index.js" + "module": "../esm5/upgrade.js", + "es2015": "../esm2015/upgrade.js" } diff --git a/packages/router/upgrade/rollup.config.js b/packages/router/upgrade/rollup.config.js index dcd7452dda..cf2db9cdcb 100644 --- a/packages/router/upgrade/rollup.config.js +++ b/packages/router/upgrade/rollup.config.js @@ -17,7 +17,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/router/esm5/upgrade/index.js', + entry: '../../../dist/packages-dist/router/esm5/upgrade.js', dest: '../../../dist/packages-dist/router/bundles/router-upgrade.umd.js', format: 'umd', exports: 'named', diff --git a/packages/router/upgrade/tsconfig-build.json b/packages/router/upgrade/tsconfig-build.json index 97b228bbea..cfab3887a9 100644 --- a/packages/router/upgrade/tsconfig-build.json +++ b/packages/router/upgrade/tsconfig-build.json @@ -19,7 +19,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "upgrade.js", "flatModuleId": "@angular/router/upgrade" } } diff --git a/packages/upgrade/package.json b/packages/upgrade/package.json index 0a2cc3105f..17eabf0591 100644 --- a/packages/upgrade/package.json +++ b/packages/upgrade/package.json @@ -3,9 +3,9 @@ "version": "0.0.0-PLACEHOLDER", "description": "Angular - the library for easing update from v1 to v2", "main": "./bundles/upgrade.umd.js", - "module": "./esm5/index.js", - "es2015": "./esm15/index.js", - "typings": "./index.d.ts", + "module": "./esm5/upgrade.js", + "es2015": "./esm2015/upgrade.js", + "typings": "./upgrade.d.ts", "author": "angular", "license": "MIT", "dependencies": { diff --git a/packages/upgrade/rollup.config.js b/packages/upgrade/rollup.config.js index 461b43d6e8..3ae4d2ee10 100644 --- a/packages/upgrade/rollup.config.js +++ b/packages/upgrade/rollup.config.js @@ -23,7 +23,7 @@ const globals = { }; export default { - entry: '../../dist/packages-dist/upgrade/esm5/index.js', + entry: '../../dist/packages-dist/upgrade/esm5/upgrade.js', dest: '../../dist/packages-dist/upgrade/bundles/upgrade.umd.js', format: 'umd', exports: 'named', diff --git a/packages/upgrade/static/package.json b/packages/upgrade/static/package.json index d5f0a87022..e1f556eaf8 100644 --- a/packages/upgrade/static/package.json +++ b/packages/upgrade/static/package.json @@ -1,7 +1,7 @@ { "name": "@angular/upgrade/static", - "typings": "./index.d.ts", + "typings": "./static.d.ts", "main": "../bundles/upgrade-static.umd.js", - "module": "../esm5/static/index.js", - "es2015": "../esm15/static/index.js" + "module": "../esm5/static.js", + "es2015": "../esm2015/static.js" } diff --git a/packages/upgrade/static/rollup.config.js b/packages/upgrade/static/rollup.config.js index bb1a1a8aeb..7f697cf69f 100644 --- a/packages/upgrade/static/rollup.config.js +++ b/packages/upgrade/static/rollup.config.js @@ -14,7 +14,7 @@ const globals = { }; export default { - entry: '../../../dist/packages-dist/upgrade/esm5/static/index.js', + entry: '../../../dist/packages-dist/upgrade/esm5/static.js', dest: '../../../dist/packages-dist/upgrade/bundles/upgrade-static.umd.js', format: 'umd', exports: 'named', diff --git a/packages/upgrade/static/tsconfig-build.json b/packages/upgrade/static/tsconfig-build.json index b940afeb64..dd80a94411 100644 --- a/packages/upgrade/static/tsconfig-build.json +++ b/packages/upgrade/static/tsconfig-build.json @@ -19,7 +19,7 @@ ], "angularCompilerOptions": { - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "static.js", "flatModuleId": "@angular/upgrade/static" } } diff --git a/packages/upgrade/tsconfig-build.json b/packages/upgrade/tsconfig-build.json index 016f264747..55e183a170 100644 --- a/packages/upgrade/tsconfig-build.json +++ b/packages/upgrade/tsconfig-build.json @@ -22,7 +22,7 @@ "angularCompilerOptions": { "annotateForClosureCompiler": true, "strictMetadataEmit": true, - "flatModuleOutFile": "index.js", + "flatModuleOutFile": "upgrade.js", "flatModuleId": "@angular/upgrade" } } diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index 700a261264..10a152bc7a 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -63,13 +63,3 @@ travisFoldStart "tsc all" node --max-old-space-size=3000 dist/packages-dist/tsc-wrapped/src/main -p packages node --max-old-space-size=3000 dist/packages-dist/tsc-wrapped/src/main -p modules travisFoldEnd "tsc all" - - -# TODO(i): what are these compilations here for? -travisFoldStart "tsc a bunch of useless stuff" - node dist/packages-dist/tsc-wrapped/src/main -p packages/core/tsconfig-build.json - node dist/packages-dist/tsc-wrapped/src/main -p packages/common/tsconfig-build.json - node dist/packages-dist/tsc-wrapped/src/main -p packages/platform-browser/tsconfig-build.json - node dist/packages-dist/tsc-wrapped/src/main -p packages/router/tsconfig-build.json - node dist/packages-dist/tsc-wrapped/src/main -p packages/forms/tsconfig-build.json -travisFoldEnd "tsc a bunch of useless stuff" diff --git a/tools/source-map-test/index.js b/tools/source-map-test/index.js index d57d93c797..d1355259ce 100644 --- a/tools/source-map-test/index.js +++ b/tools/source-map-test/index.js @@ -62,5 +62,5 @@ function logResults(failures) { } function getBundlePath(package) { - return path.resolve(process.cwd(), 'dist/packages-dist/', package, 'esm5/index.js'); + return path.resolve(process.cwd(), 'dist/packages-dist/', package, 'esm5/', package + '.js'); }