From fcbfacb6d5ad9b7c9e9505315e36469ddd97a06c Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 3 May 2016 14:43:35 -0600 Subject: [PATCH] build: do not use tsickle to lower router-deprecated if we do this, we can break existing code that is inheriting from RouterOutlet and expects the metadata in the old location --- build.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 2e5d18c6fd..fba735ad50 100755 --- a/build.sh +++ b/build.sh @@ -50,8 +50,14 @@ do UMDES5PATH=${DESTDIR}/${PACKAGE}.umd.js - echo "====== COMPILING: \$(npm bin)/ng2tc -p ${SRCDIR}/tsconfig-es5.json =====" - $(npm bin)/ng2tc -p ${SRCDIR}/tsconfig-es5.json + if [[ ${PACKAGE} == "router-deprecated" ]]; then + echo "====== COMPILING: \$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es5.json =====" + $(npm bin)/tsc -p ${SRCDIR}/tsconfig-es5.json + else + echo "====== COMPILING: \$(npm bin)/ng2tc -p ${SRCDIR}/tsconfig-es5.json =====" + $(npm bin)/ng2tc -p ${SRCDIR}/tsconfig-es5.json + fi + cp ${SRCDIR}/package.json ${DESTDIR}/ @@ -66,8 +72,13 @@ do fi - echo "====== (esm)COMPILING: \$(npm bin)/ng2tc -p ${SRCDIR}/tsconfig-es2015.json =====" - $(npm bin)/ng2tc -p ${SRCDIR}/tsconfig-es2015.json + if [[ ${PACKAGE} == "router-deprecated" ]]; then + echo "====== (esm)COMPILING: \$(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json =====" + $(npm bin)/tsc -p ${SRCDIR}/tsconfig-es2015.json + else + echo "====== (esm)COMPILING: \$(npm bin)/ng2tc -p ${SRCDIR}/tsconfig-es2015.json =====" + $(npm bin)/ng2tc -p ${SRCDIR}/tsconfig-es2015.json + fi echo "====== BUNDLING: ${SRCDIR} ====="