chore(router): enable bundling

This commit is contained in:
vsavkin
2016-06-21 14:44:36 -07:00
parent 758ee95880
commit 2eb234bc63

View File

@ -94,27 +94,25 @@ do
echo "====== BUNDLING: ${SRCDIR} =====" echo "====== BUNDLING: ${SRCDIR} ====="
mkdir ${DESTDIR}/bundles mkdir ${DESTDIR}/bundles
if [[ ${PACKAGE} != router ]]; then (
( cd ${SRCDIR}
cd ${SRCDIR} echo "..." # here just to have grep match something and not exit with 1
echo "..." # here just to have grep match something and not exit with 1 ../../../node_modules/.bin/rollup -c rollup.config.js
../../../node_modules/.bin/rollup -c rollup.config.js ) 2>&1 | grep -v "as external dependency"
) 2>&1 | grep -v "as external dependency"
$(npm bin)/tsc \ $(npm bin)/tsc \
--out ${UMD_ES5_PATH} \ --out ${UMD_ES5_PATH} \
--target es5 \ --target es5 \
--lib "es6,dom" \ --lib "es6,dom" \
--allowJs \ --allowJs \
${UMD_ES6_PATH} ${UMD_ES6_PATH}
rm ${UMD_ES6_PATH} rm ${UMD_ES6_PATH}
cat ./modules/@angular/license-banner.txt > ${UMD_ES5_PATH}.tmp cat ./modules/@angular/license-banner.txt > ${UMD_ES5_PATH}.tmp
cat ${UMD_ES5_PATH} >> ${UMD_ES5_PATH}.tmp cat ${UMD_ES5_PATH} >> ${UMD_ES5_PATH}.tmp
mv ${UMD_ES5_PATH}.tmp ${UMD_ES5_PATH} 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 fi
done done