diff --git a/build.sh b/build.sh index 0888aa9c8d..d457c94d21 100755 --- a/build.sh +++ b/build.sh @@ -112,6 +112,7 @@ do PWD=`pwd` SRCDIR=${PWD}/modules/@angular/${PACKAGE} DESTDIR=${PWD}/dist/packages-dist/${PACKAGE} + ES2015_DESTDIR=${PWD}/dist/packages-dist-es2015/${PACKAGE} UMD_ES5_PATH=${DESTDIR}/bundles/${PACKAGE}.umd.js UMD_TESTING_ES5_PATH=${DESTDIR}/bundles/${PACKAGE}-testing.umd.js UMD_STATIC_ES5_PATH=${DESTDIR}/bundles/${PACKAGE}-static.umd.js @@ -131,6 +132,13 @@ do echo "====== COMPILING: ${TSC} -p ${SRCDIR}/tsconfig-build.json =====" $TSC -p ${SRCDIR}/tsconfig-build.json + # ES2015 distro is not ready yet; don't slow down all builds for it + # TODO(alexeagle,igorminar): figure out ES2015 story and enable + if [[ -n "${EXPERIMENTAL_ES2015_DISTRO}" ]]; then + $TSC -p ${SRCDIR}/tsconfig-build.json --target es2015 --outDir ${ES2015_DESTDIR} + cp ${SRCDIR}/package.json ${ES2015_DESTDIR}/ + cp ${PWD}/modules/@angular/README.md ${ES2015_DESTDIR}/ + fi if [[ -e ${SRCDIR}/tsconfig-upgrade.json ]]; then echo "====== COMPILING: ${TSC} -p ${SRCDIR}/tsconfig-upgrade.json =====" @@ -214,8 +222,12 @@ do $UGLIFYJS -c --screw-ie8 --comments -o ${UMD_UPGRADE_ES5_MIN_PATH} ${UMD_UPGRADE_ES5_PATH} fi ) 2>&1 | grep -v "as external dependency" + + if [[ -n "${EXPERIMENTAL_ES2015_DISTRO}" ]]; then + cp -prv ${DESTDIR}/bundles ${ES2015_DESTDIR} + fi fi - + ( echo "====== VERSION: Updating version references" cd ${DESTDIR} diff --git a/scripts/publish/publish-build-artifacts.sh b/scripts/publish/publish-build-artifacts.sh index 9b1ef1fed3..f478204d37 100755 --- a/scripts/publish/publish-build-artifacts.sh +++ b/scripts/publish/publish-build-artifacts.sh @@ -68,7 +68,11 @@ function publishRepo { # Publish all individual packages from packages-dist. function publishPackages { - for dir in dist/packages-dist/*/ dist/tools/@angular/tsc-wrapped + PKGS_DIST=dist/packages-dist + if [[ -n "${EXPERIMENTAL_ES2015_DISTRO}" ]]; then + PKGS_DIST=dist/packages-dist-es2015 + fi + for dir in $PKGS_DIST/*/ dist/tools/@angular/tsc-wrapped do COMPONENT="$(basename ${dir})"