perf: distrubute smaller bundled code and include es2015 bundle
TypeScript compiler will now build to ES2015 code and modules. Babili is used to minify ES2015 code, providing an initial optimization that we couldn't previously get just from Uglify. Uses Babel to convert ES2015 to UMD/ES5 code, and Uglify to minimize the output.
This commit is contained in:
parent
738d93caf7
commit
de795ea233
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"plugins": ["transform-es2015-modules-umd"],
|
||||
"presets": ["es2015"]
|
||||
}
|
|
@ -34,7 +34,7 @@ env:
|
|||
- secure: "MPx3UM77o5IlhT75PKHL0FXoB5tSXDc3vnCXCd1sRy4XUTZ9vjcV6nNuyqEf+SOw659bGbC1FI4mACGx1Q+z7MQDR85b1mcA9uSgHDkh+IR82CnCVdaX9d1RXafdJIArahxfmorbiiPPLyPIKggo7ituRm+2c+iraoCkE/pXxYg="
|
||||
matrix:
|
||||
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
|
||||
- CI_MODE=e2e EXPERIMENTAL_ES2015_DISTRO=1
|
||||
- CI_MODE=e2e
|
||||
- CI_MODE=js
|
||||
- CI_MODE=saucelabs_required
|
||||
- CI_MODE=browserstack_required
|
||||
|
|
247
build.sh
247
build.sh
|
@ -20,12 +20,14 @@ PACKAGES=(core
|
|||
compiler-cli
|
||||
language-service
|
||||
benchpress)
|
||||
|
||||
BUILD_ALL=true
|
||||
BUNDLE=true
|
||||
VERSION_PREFIX=$(node -p "require('./package.json').version")
|
||||
VERSION_SUFFIX="-$(git log --oneline -1 | awk '{print $1}')"
|
||||
ROUTER_VERSION_PREFIX=$(node -p "require('./package.json').version.replace(/^2/, '3')")
|
||||
REMOVE_BENCHPRESS=false
|
||||
BUILD_EXAMPLES=true
|
||||
|
||||
for ARG in "$@"; do
|
||||
case "$ARG" in
|
||||
|
@ -41,6 +43,9 @@ for ARG in "$@"; do
|
|||
VERSION_SUFFIX=""
|
||||
REMOVE_BENCHPRESS=true
|
||||
;;
|
||||
--examples=*)
|
||||
BUILD_EXAMPLES=${ARG#--examples=}
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option $ARG."
|
||||
exit 1
|
||||
|
@ -48,6 +53,34 @@ for ARG in "$@"; do
|
|||
esac
|
||||
done
|
||||
|
||||
getPackageContents() {
|
||||
echo "{\"typings\": \"../typings/${2}/${2}.d.ts\", \"main\": \"../bundles/${1}-${2}.umd.js\", \"module\": \"../@angular/${1}/${2}.es5.js\", \"es2015\": \"../@angular/${1}/${2}.js\"}"
|
||||
}
|
||||
|
||||
containsElement () {
|
||||
local e
|
||||
for e in "${@:2}"; do
|
||||
[[ "$e" == "$1" ]] && return 0;
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
NON_MODULE=(
|
||||
platform-browser
|
||||
)
|
||||
|
||||
moveTypings() {
|
||||
# $1 == Source copy root (/src or /testing)
|
||||
# $2 == Final destination directory
|
||||
rsync -a --exclude=*.js* ${1} ${2}
|
||||
}
|
||||
|
||||
cleanTypings() {
|
||||
# $1 == Source root (where index.d.ts file is, for instance)
|
||||
# $2 == Source copy root (/src or /typings)
|
||||
rm -f ${1}/index.*
|
||||
rm -rf ${2}
|
||||
}
|
||||
VERSION="${VERSION_PREFIX}${VERSION_SUFFIX}"
|
||||
ROUTER_VERSION="${ROUTER_VERSION_PREFIX}${VERSION_SUFFIX}"
|
||||
echo "====== BUILDING: Version ${VERSION} (Router ${ROUTER_VERSION})"
|
||||
|
@ -55,6 +88,8 @@ echo "====== BUILDING: Version ${VERSION} (Router ${ROUTER_VERSION})"
|
|||
export NODE_PATH=${NODE_PATH}:$(pwd)/dist/all:$(pwd)/dist/tools
|
||||
TSC="node --max-old-space-size=3000 dist/tools/@angular/tsc-wrapped/src/main"
|
||||
UGLIFYJS=`pwd`/node_modules/.bin/uglifyjs
|
||||
BABELJS=`pwd`/node_modules/.bin/babel
|
||||
BABILI=`pwd`/node_modules/.bin/babili
|
||||
TSCONFIG=./tools/tsconfig.json
|
||||
echo "====== (tools)COMPILING: \$(npm bin)/tsc -p ${TSCONFIG} ====="
|
||||
rm -rf ./dist/tools/
|
||||
|
@ -111,16 +146,30 @@ fi
|
|||
for PACKAGE in ${PACKAGES[@]}
|
||||
do
|
||||
PWD=`pwd`
|
||||
ROOTDIR=${PWD}/modules/@angular
|
||||
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
|
||||
UMD_UPGRADE_ES5_PATH=${DESTDIR}/bundles/${PACKAGE}-upgrade.umd.js
|
||||
UMD_ES5_MIN_PATH=${DESTDIR}/bundles/${PACKAGE}.umd.min.js
|
||||
UMD_STATIC_ES5_MIN_PATH=${DESTDIR}/bundles/${PACKAGE}-static.umd.min.js
|
||||
UMD_UPGRADE_ES5_MIN_PATH=${DESTDIR}/bundles/${PACKAGE}-upgrade.umd.min.js
|
||||
DEST_MODULE=${DESTDIR}/@angular
|
||||
DEST_BUNDLES=${DESTDIR}/bundles
|
||||
|
||||
# ESM/ES6
|
||||
JS_PATH=${DEST_MODULE}/${PACKAGE}.js
|
||||
JS_PATH_ES5=${DEST_MODULE}/${PACKAGE}.es5.js
|
||||
JS_TESTING_PATH=${DEST_MODULE}/${PACKAGE}/testing.js
|
||||
JS_TESTING_PATH_ES5=${DEST_MODULE}/${PACKAGE}/testing.es5.js
|
||||
JS_STATIC_PATH=${DEST_MODULE}/${PACKAGE}/static.js
|
||||
JS_STATIC_PATH_ES5=${DEST_MODULE}/${PACKAGE}/static.es5.js
|
||||
JS_UPGRADE_PATH=${DEST_MODULE}/${PACKAGE}/upgrade.js
|
||||
JS_UPGRADE_PATH_ES5=${DEST_MODULE}/${PACKAGE}/upgrade.es5.js
|
||||
|
||||
# UMD/ES5
|
||||
UMD_ES5_PATH=${DEST_BUNDLES}/${PACKAGE}.umd.js
|
||||
UMD_TESTING_ES5_PATH=${DEST_BUNDLES}/${PACKAGE}-testing.umd.js
|
||||
UMD_STATIC_ES5_PATH=${DEST_BUNDLES}/${PACKAGE}-static.umd.js
|
||||
UMD_UPGRADE_ES5_PATH=${DEST_BUNDLES}/${PACKAGE}-upgrade.umd.js
|
||||
UMD_ES5_MIN_PATH=${DEST_BUNDLES}/${PACKAGE}.umd.min.js
|
||||
UMD_STATIC_ES5_MIN_PATH=${DEST_BUNDLES}/${PACKAGE}-static.umd.min.js
|
||||
UMD_UPGRADE_ES5_MIN_PATH=${DEST_BUNDLES}/${PACKAGE}-upgrade.umd.min.js
|
||||
|
||||
if [[ ${PACKAGE} != router ]]; then
|
||||
LICENSE_BANNER=${PWD}/modules/@angular/license-banner.txt
|
||||
|
@ -131,34 +180,51 @@ do
|
|||
|
||||
rm -rf ${DESTDIR}
|
||||
|
||||
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}/
|
||||
echo "====== [${PACKAGE}]: COMPILING: ${TSC} --skipImportRename -p ${SRCDIR}/tsconfig-build.json"
|
||||
if [[ -e ${SRCDIR}/.babelrc || ${PACKAGE} == "compiler" ]]; then
|
||||
$TSC --skipImportRename -p ${SRCDIR}/tsconfig-build.json -outDir ${DEST_MODULE}
|
||||
else
|
||||
$TSC --skipImportRename -p ${SRCDIR}/tsconfig-build.json
|
||||
fi
|
||||
|
||||
if [[ -e ${SRCDIR}/tsconfig-upgrade.json ]]; then
|
||||
echo "====== COMPILING: ${TSC} -p ${SRCDIR}/tsconfig-upgrade.json ====="
|
||||
$TSC -p ${SRCDIR}/tsconfig-upgrade.json
|
||||
echo "====== Move ${PACKAGE} typings"
|
||||
if [[ -e ${SRCDIR}/.babelrc || -d ${DEST_MODULE} ]]; then
|
||||
rsync -a --exclude=*.js --exclude=*.js.map ${DEST_MODULE}/ ${DESTDIR}/typings
|
||||
mv ${DESTDIR}/typings/index.d.ts ${DESTDIR}/typings/${PACKAGE}.d.ts
|
||||
mv ${DESTDIR}/typings/index.metadata.json ${DESTDIR}/typings/${PACKAGE}.metadata.json
|
||||
else
|
||||
rsync -a --exclude=*.js --exclude=*.js.map ${DESTDIR}/ ${DESTDIR}/typings
|
||||
find ${DESTDIR} -name "*.d.ts" -not -path "${DESTDIR}/typings/*" -exec rm -f {} \;
|
||||
fi
|
||||
|
||||
if [[ -e ${SRCDIR}/tsconfig-es5.json ]]; then
|
||||
echo "====== [${PACKAGE}]: COMPILING (ES5): ${TSC} -p ${SRCDIR}/tsconfig-es5.json"
|
||||
$TSC -p ${SRCDIR}/tsconfig-es5.json
|
||||
fi
|
||||
|
||||
cp ${SRCDIR}/package.json ${DESTDIR}/
|
||||
if [[ -e ${SRCDIR}/.babelrc ]]; then
|
||||
cp ${SRCDIR}/.babelrc ${DESTDIR}/
|
||||
fi
|
||||
cp ${PWD}/modules/@angular/README.md ${DESTDIR}/
|
||||
|
||||
if [[ -e ${SRCDIR}/tsconfig-upgrade.json ]]; then
|
||||
echo "====== [${PACKAGE}]: COMPILING (UPGRADE): ${TSC} -p ${SRCDIR}/tsconfig-upgrade.json"
|
||||
$TSC -p ${SRCDIR}/tsconfig-upgrade.json
|
||||
fi
|
||||
|
||||
if [[ -e ${SRCDIR}/tsconfig-testing.json ]]; then
|
||||
echo "====== COMPILING TESTING: ${TSC} -p ${SRCDIR}/tsconfig-testing.json"
|
||||
echo "====== [${PACKAGE}]: COMPILING (TESTING): ${TSC} -p ${SRCDIR}/tsconfig-testing.json"
|
||||
$TSC -p ${SRCDIR}/tsconfig-testing.json
|
||||
if [[ -n "${EXPERIMENTAL_ES2015_DISTRO}" ]]; then
|
||||
$TSC -p ${SRCDIR}/tsconfig-testing.json --target es2015 --outDir ${ES2015_DESTDIR}
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -e ${SRCDIR}/tsconfig-static.json ]]; then
|
||||
echo "====== [${PACKAGE}]: COMPILING (STATIC): ${TSC} -p ${SRCDIR}/tsconfig-static.json"
|
||||
$TSC -p ${SRCDIR}/tsconfig-static.json
|
||||
fi
|
||||
|
||||
if [[ -e ${SRCDIR}/tsconfig-2015.json ]]; then
|
||||
echo "====== COMPILING ESM: ${TSC} -p ${SRCDIR}/tsconfig-2015.json"
|
||||
echo "====== [${PACKAGE}]: COMPILING (ES2015): ${TSC} -p ${SRCDIR}/tsconfig-2015.json"
|
||||
${TSC} -p ${SRCDIR}/tsconfig-2015.json
|
||||
fi
|
||||
|
||||
|
@ -170,44 +236,122 @@ do
|
|||
if [[ ${BUNDLE} == true && ${PACKAGE} != compiler-cli && ${PACKAGE} != benchpress ]]; then
|
||||
|
||||
echo "====== BUNDLING: ${SRCDIR} ====="
|
||||
mkdir ${DESTDIR}/bundles
|
||||
mkdir ${DEST_BUNDLES}
|
||||
|
||||
(
|
||||
cd ${SRCDIR}
|
||||
echo "====== Rollup ${PACKAGE} index"
|
||||
../../../node_modules/.bin/rollup -c rollup.config.js
|
||||
cat ${LICENSE_BANNER} > ${UMD_ES5_PATH}.tmp
|
||||
cat ${UMD_ES5_PATH} >> ${UMD_ES5_PATH}.tmp
|
||||
mv ${UMD_ES5_PATH}.tmp ${UMD_ES5_PATH}
|
||||
$UGLIFYJS -c --screw-ie8 --comments -o ${UMD_ES5_MIN_PATH} ${UMD_ES5_PATH}
|
||||
../../../node_modules/.bin/rollup -i ${DEST_MODULE}/index.js -o ${JS_PATH}
|
||||
cat ${LICENSE_BANNER} > ${JS_PATH}.tmp
|
||||
cat ${JS_PATH} >> ${JS_PATH}.tmp
|
||||
mv ${JS_PATH}.tmp ${JS_PATH}
|
||||
|
||||
if [[ -e rollup-testing.config.js ]]; then
|
||||
if ! [[ ${PACKAGE} == 'benchpress' ]]; then
|
||||
cleanTypings ${DEST_MODULE} ${DEST_MODULE}/src
|
||||
fi
|
||||
|
||||
if [[ -e ${DESTDIR}/.babelrc ]]; then
|
||||
|
||||
echo "====== Downleveling ${PACKAGE} to ES5/UMD"
|
||||
$BABELJS ${JS_PATH} -o ${UMD_ES5_PATH}
|
||||
|
||||
### Minification ###
|
||||
echo "====== Minifying JavaScript"
|
||||
$BABILI ${JS_PATH} -o ${UMD_ES5_MIN_PATH}
|
||||
echo "====== Downleveling min JavaScript to ES5/UMD"
|
||||
$BABELJS ${UMD_ES5_MIN_PATH} -o ${UMD_ES5_MIN_PATH}
|
||||
|
||||
echo "====== Minifying ${PACKAGE}"
|
||||
$UGLIFYJS -c --screw-ie8 --comments -o ${UMD_ES5_MIN_PATH} ${UMD_ES5_MIN_PATH}
|
||||
### END Minification ###
|
||||
else
|
||||
# For packages not running through babel, use the es5/umd config
|
||||
echo "====== Rollup ${PACKAGE} index to UMD"
|
||||
../../../node_modules/.bin/rollup -c rollup-umd.config.js
|
||||
[[ -d ${DESTDIR}/es5 ]] && rm -rf ${DESTDIR}/es5
|
||||
echo "====== Minifying UMD ${PACKAGE}"
|
||||
$UGLIFYJS -c --screw-ie8 --comments -o ${UMD_ES5_MIN_PATH} ${UMD_ES5_PATH}
|
||||
fi
|
||||
|
||||
rm -f ${DISTDIR}/.babelrc
|
||||
cp ${ROOTDIR}/.babelrc ${DEST_MODULE}/.babelrc
|
||||
$BABELJS ${JS_PATH} -o ${JS_PATH_ES5}
|
||||
|
||||
if [[ -d testing ]]; then
|
||||
echo "====== Rollup ${PACKAGE} testing"
|
||||
../../../node_modules/.bin/rollup -c rollup-testing.config.js
|
||||
echo "{\"main\": \"../bundles/${PACKAGE}-testing.umd.js\"}" > ${DESTDIR}/testing/package.json
|
||||
../../../node_modules/.bin/rollup -i ${DESTDIR}/testing/index.js -o ${DESTDIR}/testing.tmp.js
|
||||
|
||||
echo "====== Downleveling ${PACKAGE} TESTING to ES5/UMD"
|
||||
[[ -e ${SRCDIR}/.babelrc-testing ]] && cp ${SRCDIR}/.babelrc-testing ${DESTDIR}/.babelrc
|
||||
$BABELJS ${DESTDIR}/testing.tmp.js -o ${UMD_TESTING_ES5_PATH}
|
||||
rm -f ${DESTDIR}/.babelrc
|
||||
|
||||
echo "====== Move ${PACKAGE} testing typings"
|
||||
rsync -a --exclude=*.js --exclude=*.js.map ${DESTDIR}/testing/ ${DESTDIR}/typings/testing
|
||||
mv ${DESTDIR}/typings/testing/index.d.ts ${DESTDIR}/typings/testing/testing.d.ts
|
||||
mv ${DESTDIR}/typings/testing/index.metadata.json ${DESTDIR}/typings/testing/testing.metadata.json
|
||||
|
||||
rm -rf ${DESTDIR}/testing
|
||||
|
||||
mkdir ${DESTDIR}/testing && [[ -d ${DEST_MODULE}/${PACKAGE} ]] || mkdir ${DEST_MODULE}/${PACKAGE}
|
||||
|
||||
getPackageContents "${PACKAGE}" "testing" > ${DESTDIR}/testing/package.json
|
||||
|
||||
mv ${DESTDIR}/testing.tmp.js ${JS_TESTING_PATH}
|
||||
$BABELJS ${JS_TESTING_PATH} -o ${JS_TESTING_PATH_ES5}
|
||||
cat ${LICENSE_BANNER} > ${UMD_TESTING_ES5_PATH}.tmp
|
||||
cat ${UMD_TESTING_ES5_PATH} >> ${UMD_TESTING_ES5_PATH}.tmp
|
||||
mv ${UMD_TESTING_ES5_PATH}.tmp ${UMD_TESTING_ES5_PATH}
|
||||
fi
|
||||
|
||||
if [[ -e rollup-static.config.js ]]; then
|
||||
if [[ -e static.ts ]]; then
|
||||
echo "====== Rollup ${PACKAGE} static"
|
||||
../../../node_modules/.bin/rollup -c rollup-static.config.js
|
||||
# create dir because it doesn't exist yet, we should move the src code here and remove this line
|
||||
mkdir ${DESTDIR}/static
|
||||
echo "{\"main\": \"../bundles/${PACKAGE}-static.umd.js\"}" > ${DESTDIR}/static/package.json
|
||||
rm -f ${DEST_MODULE}/static.*
|
||||
../../../node_modules/.bin/rollup -i ${DESTDIR}/static/static.js -o ${DESTDIR}/static.tmp.js
|
||||
|
||||
echo "====== Downleveling ${PACKAGE} STATIC to ES5/UMD"
|
||||
[[ -e ${SRCDIR}/.babelrc-static ]] && cp ${SRCDIR}/.babelrc-static ${DESTDIR}/.babelrc
|
||||
$BABELJS ${DESTDIR}/static.tmp.js -o ${UMD_STATIC_ES5_PATH}
|
||||
rm -f ${DESTDIR}/.babelrc
|
||||
|
||||
echo "====== Move ${PACKAGE} static typings"
|
||||
rsync -a --exclude=*.js ${DESTDIR}/static/ ${DESTDIR}/typings/static
|
||||
rm -f ${DESTDIR}/typings/static/index.d.ts
|
||||
rm -rf ${DESTDIR}/static
|
||||
|
||||
mkdir ${DESTDIR}/static && [[ -d ${DEST_MODULE}/${PACKAGE} ]] || mkdir ${DEST_MODULE}/${PACKAGE}
|
||||
|
||||
getPackageContents "${PACKAGE}" "static"> ${DESTDIR}/static/package.json
|
||||
|
||||
mv ${DESTDIR}/static.tmp.js ${JS_STATIC_PATH}
|
||||
$BABELJS ${JS_STATIC_PATH} -o ${JS_STATIC_PATH_ES5}
|
||||
cat ${LICENSE_BANNER} > ${UMD_STATIC_ES5_PATH}.tmp
|
||||
cat ${UMD_STATIC_ES5_PATH} >> ${UMD_STATIC_ES5_PATH}.tmp
|
||||
mv ${UMD_STATIC_ES5_PATH}.tmp ${UMD_STATIC_ES5_PATH}
|
||||
$UGLIFYJS -c --screw-ie8 --comments -o ${UMD_STATIC_ES5_MIN_PATH} ${UMD_STATIC_ES5_PATH}
|
||||
fi
|
||||
|
||||
if [[ -e rollup-upgrade.config.js ]]; then
|
||||
if [[ -e upgrade.ts ]]; then
|
||||
echo "====== Rollup ${PACKAGE} upgrade"
|
||||
../../../node_modules/.bin/rollup -c rollup-upgrade.config.js
|
||||
# create dir because it doesn't exist yet, we should move the src code here and remove this line
|
||||
mkdir ${DESTDIR}/upgrade
|
||||
echo "{\"main\": \"../bundles/${PACKAGE}-upgrade.umd.js\"}" > ${DESTDIR}/upgrade/package.json
|
||||
rm -f ${DEST_MODULE}/upgrade.*
|
||||
../../../node_modules/.bin/rollup -i ${DESTDIR}/upgrade/upgrade.js -o ${DESTDIR}/upgrade.tmp.js
|
||||
|
||||
echo "====== Downleveling ${PACKAGE} UPGRADE to ES5/UMD"
|
||||
[[ -e ${SRCDIR}/.babelrc-upgrade ]] && cp ${SRCDIR}/.babelrc-upgrade ${DESTDIR}/.babelrc
|
||||
$BABELJS ${DESTDIR}/upgrade.tmp.js -o ${UMD_UPGRADE_ES5_PATH}
|
||||
rm -f ${DESTDIR}/.babelrc
|
||||
|
||||
echo "====== Move ${PACKAGE} upgrade typings"
|
||||
rsync -a --exclude=*.js ${DESTDIR}/upgrade/ ${DESTDIR}/typings/upgrade
|
||||
rm -f ${DESTDIR}/typings/upgrade/index.d.ts
|
||||
rm -rf ${DESTDIR}/upgrade
|
||||
|
||||
mkdir ${DESTDIR}/upgrade && [[ -d ${DEST_MODULE}/${PACKAGE} ]] || mkdir ${DEST_MODULE}/${PACKAGE}
|
||||
|
||||
getPackageContents "${PACKAGE}" "upgrade" > ${DESTDIR}/upgrade/package.json
|
||||
|
||||
mv ${DESTDIR}/upgrade.tmp.js ${JS_UPGRADE_PATH}
|
||||
$BABELJS ${JS_UPGRADE_PATH} -o ${JS_UPGRADE_PATH_ES5}
|
||||
cat ${LICENSE_BANNER} > ${UMD_UPGRADE_ES5_PATH}.tmp
|
||||
cat ${UMD_UPGRADE_ES5_PATH} >> ${UMD_UPGRADE_ES5_PATH}.tmp
|
||||
mv ${UMD_UPGRADE_ES5_PATH}.tmp ${UMD_UPGRADE_ES5_PATH}
|
||||
|
@ -215,14 +359,15 @@ do
|
|||
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}
|
||||
if [[ -e ${SRCDIR}/.babelrc ]]; then
|
||||
cd ${DEST_MODULE}
|
||||
else
|
||||
cd ${DESTDIR}
|
||||
fi
|
||||
echo "====== EXECUTE: perl -p -i -e \"s/0\.0\.0\-PLACEHOLDER/${VERSION}/g\" $""(grep -ril 0\.0\.0\-PLACEHOLDER .)"
|
||||
perl -p -i -e "s/0\.0\.0\-PLACEHOLDER/${VERSION}/g" $(grep -ril 0\.0\.0\-PLACEHOLDER .) < /dev/null 2> /dev/null
|
||||
echo "====== EXECUTE: perl -p -i -e \"s/0\.0\.0\-ROUTERPLACEHOLDER/${ROUTER_VERSION}/g\" $""(grep -ril 0\.0\.0\-ROUTERPLACEHOLDER .)"
|
||||
|
@ -230,9 +375,11 @@ do
|
|||
)
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "====== Building examples: ./modules/@angular/examples/build.sh ====="
|
||||
./modules/@angular/examples/build.sh
|
||||
if [[ ${BUILD_EXAMPLES} == true ]]; then
|
||||
echo ""
|
||||
echo "====== Building examples: ./modules/@angular/examples/build.sh ====="
|
||||
./modules/@angular/examples/build.sh
|
||||
fi
|
||||
|
||||
if [[ ${REMOVE_BENCHPRESS} == true ]]; then
|
||||
echo ""
|
||||
|
|
|
@ -7,3 +7,4 @@ vendor/
|
|||
**/*.ngfactory.ts
|
||||
**/*.ngsummary.json
|
||||
*/yarn*
|
||||
*/.yarn_local_cache*
|
||||
|
|
|
@ -35,7 +35,6 @@ Angular's `node_modules` is installed.
|
|||
The first time you run the tests, you'll need some setup:
|
||||
|
||||
```shell
|
||||
$ EXPERIMENTAL_ES2015_DISTRO=1 ./build.sh
|
||||
$ ./integration/build_rxjs_es6.sh
|
||||
```
|
||||
|
||||
|
@ -44,7 +43,7 @@ See the `package.json` of the test(s) you're debugging, to see which dist/ folde
|
|||
Then run the right `tsc --watch` command to keep those dist folders up-to-date, for example:
|
||||
|
||||
```
|
||||
$ ./node_modules/.bin/tsc -p modules/@angular/core/tsconfig-build.json --target es2015 --outDir dist/packages-dist-es2015/core --watch
|
||||
$ ./node_modules/.bin/tsc -p modules/@angular/core/tsconfig-build.json --outDir dist/packages-dist/core --watch
|
||||
```
|
||||
|
||||
Now you can run the integration test, it will re-install from the dist/ folder on each run.
|
||||
|
|
|
@ -25,7 +25,10 @@ CLOSURE_ARGS=(
|
|||
"--rewrite_polyfills=false"
|
||||
|
||||
# List of path prefixes to be removed from ES6 & CommonJS modules.
|
||||
"--js_module_root=node_modules"
|
||||
"--js_module_root=node_modules/@angular/core"
|
||||
"--js_module_root=node_modules/@angular/common"
|
||||
"--js_module_root=node_modules/@angular/compiler"
|
||||
"--js_module_root=node_modules/@angular/platform-browser"
|
||||
"--js_module_root=vendor"
|
||||
|
||||
# Uncomment for easier debugging
|
||||
|
@ -34,9 +37,10 @@ CLOSURE_ARGS=(
|
|||
e2e/testability.externs.js
|
||||
node_modules/zone.js/dist/zone.js
|
||||
$(find -L vendor/rxjs -name *.js)
|
||||
node_modules/@angular/{core,common,compiler,platform-browser}/index.js
|
||||
node_modules/@angular/{core,common}/public_api.js
|
||||
$(find node_modules/@angular/{core,common,compiler,platform-browser}/src -name *.js)
|
||||
node_modules/@angular/core/@angular/core.js
|
||||
node_modules/@angular/common/@angular/common.js
|
||||
node_modules/@angular/compiler/@angular/compiler.js
|
||||
node_modules/@angular/platform-browser/@angular/platform-browser.js
|
||||
"built/src/*.js"
|
||||
"--entry_point=./built/src/main"
|
||||
)
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
"version": "0.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@angular/common": "file:../../dist/packages-dist-es2015/common",
|
||||
"@angular/compiler": "file:../../dist/packages-dist-es2015/compiler",
|
||||
"@angular/compiler-cli": "file:../../dist/packages-dist-es2015/compiler-cli",
|
||||
"@angular/core": "file:../../dist/packages-dist-es2015/core",
|
||||
"@angular/platform-browser": "file:../../dist/packages-dist-es2015/platform-browser",
|
||||
"@angular/platform-server": "file:../../dist/packages-dist-es2015/platform-server",
|
||||
"@angular/common": "file:../../dist/packages-dist/common",
|
||||
"@angular/compiler": "file:../../dist/packages-dist/compiler",
|
||||
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
|
||||
"@angular/core": "file:../../dist/packages-dist/core",
|
||||
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
|
||||
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
|
||||
"@angular/tsc-wrapped": "file:../../dist/tools/@angular/tsc-wrapped",
|
||||
"google-closure-compiler": "20161201.0.0",
|
||||
"rxjs": "file:../../node_modules/rxjs",
|
||||
|
|
|
@ -10,12 +10,6 @@ if [ ! -d "rxjs/dist/es6" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "../dist/packages-dist-es2015" ]; then
|
||||
echo "You must build the ES2015 distro for some tests:"
|
||||
echo "EXPERIMENTAL_ES2015_DISTRO=1 ./build.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Workaround https://github.com/yarnpkg/yarn/issues/2165
|
||||
# Yarn will cache file://dist URIs and not update Angular code
|
||||
readonly cache=.yarn_local_cache
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"presets": [
|
||||
["es2015", { "modules": false }]
|
||||
]
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/core": "ng.core",
|
||||
"@angular/animation": "ng.animation",
|
||||
"rxjs/Observable": "Rx",
|
||||
"rxjs/Subject": "Rx"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/animation"
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/core": "ng.core",
|
||||
"@angular/animation": "ng.animation",
|
||||
"@angular/animation/testing": "ng.animation.testing",
|
||||
"rxjs/Observable": "Rx",
|
||||
"rxjs/Subject": "Rx"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/animation/testing"
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
// This file is not used to build this module. It is only used during editing
|
||||
// by the TypeScript language serivce and during build for verifcation. `ngc`
|
||||
// by the TypeScript language service and during build for verification. `ngc`
|
||||
// replaces this file with production index.ts when it rewrites private symbol
|
||||
// names.
|
||||
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
"name": "@angular/animation",
|
||||
"version": "0.0.0-PLACEHOLDER",
|
||||
"description": "Angular - animation integration with web-animations",
|
||||
"main": "bundles/animation.umd.js",
|
||||
"module": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"main": "./bundles/animation.umd.js",
|
||||
"module": "./@angular/animation.es5.js",
|
||||
"es2015": "./@angular/animation.js",
|
||||
"typings": "./typings/animation.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/animation/testing/index.js',
|
||||
dest: '../../../dist/packages-dist/animation/bundles/animation-testing.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.animation.testing',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/animation': 'ng.animation',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/Subject': 'Rx'
|
||||
}
|
||||
};
|
|
@ -1,19 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/animation/index.js',
|
||||
dest: '../../../dist/packages-dist/animation/bundles/animation.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.animation',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/Subject': 'Rx',
|
||||
}
|
||||
};
|
|
@ -80,9 +80,13 @@ export class WebAnimationsPlayer implements AnimationPlayer {
|
|||
});
|
||||
|
||||
if (missingStyleProps.length) {
|
||||
for (let i = 1; i < keyframes.length; i++) {
|
||||
const self = this;
|
||||
// tslint:disable-next-line
|
||||
for (var i = 1; i < keyframes.length; i++) {
|
||||
let kf = keyframes[i];
|
||||
missingStyleProps.forEach(prop => { kf[prop] = _computeStyle(this.element, prop); });
|
||||
missingStyleProps.forEach(function(prop) {
|
||||
kf[prop] = _computeStyle(self.element, prop);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es5",
|
||||
"target": "es2015",
|
||||
"lib": ["es2015", "dom"],
|
||||
"skipLibCheck": true,
|
||||
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
{
|
||||
"extends": "./tsconfig-build",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"declaration": true,
|
||||
"stripInternal": true,
|
||||
"experimentalDecorators": true,
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "../../../dist/packages-dist/animation/",
|
||||
"outDir": "../../../dist/packages-dist/animation",
|
||||
"paths": {
|
||||
"@angular/core": ["../../../dist/packages-dist/core/"],
|
||||
"@angular/animation": ["../../../dist/packages-dist/animation/"]
|
||||
},
|
||||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"lib": ["es6", "dom"],
|
||||
"target": "es5",
|
||||
"skipLibCheck": true
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"testing/index.ts",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"version": "0.1.0",
|
||||
"description": "Benchpress - a framework for e2e performance tests",
|
||||
"main": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"typings": "./typings/index.d.ts",
|
||||
"dependencies": {
|
||||
"@angular/core": "^2.0.0-rc.7",
|
||||
"reflect-metadata": "^0.1.2",
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"lib": ["es6", "dom"],
|
||||
"noImplicitAny": true,
|
||||
"sourceMap": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@angular/core": ["../../../dist/packages-dist/core"]
|
||||
},
|
||||
"experimentalDecorators": true,
|
||||
"rootDir": ".",
|
||||
"sourceRoot": ".",
|
||||
"outDir": "../../../dist/packages-dist/benchpress",
|
||||
"declaration": true,
|
||||
"skipLibCheck": true,
|
||||
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||
"types": []
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es2015",
|
||||
"lib": ["es6", "dom"],
|
||||
"noImplicitAny": true,
|
||||
"sourceMap": true,
|
||||
"baseUrl": ".",
|
||||
"outDir": "../../../dist/packages-dist/benchpress",
|
||||
"paths": {
|
||||
"@angular/core": ["../../../dist/packages-dist/core"]
|
||||
},
|
||||
"exclude": ["integrationtest"],
|
||||
"files": [
|
||||
"index.ts",
|
||||
"../../../node_modules/@types/node/index.d.ts",
|
||||
"../../../node_modules/@types/jasmine/index.d.ts",
|
||||
"../../../node_modules/zone.js/dist/zone.js.d.ts"
|
||||
]
|
||||
"experimentalDecorators": true,
|
||||
"rootDir": ".",
|
||||
"sourceRoot": ".",
|
||||
"declaration": true,
|
||||
"skipLibCheck": true,
|
||||
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||
"types": []
|
||||
},
|
||||
"exclude": ["integrationtest"],
|
||||
"files": [
|
||||
"index.ts",
|
||||
"../../../node_modules/@types/node/index.d.ts",
|
||||
"../../../node_modules/@types/jasmine/index.d.ts",
|
||||
"../../../node_modules/zone.js/dist/zone.js.d.ts"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/common": "ng.common",
|
||||
"@angular/core": "ng.core",
|
||||
"rxjs/Subject": "Rx"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/common"
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/common": "ng.common",
|
||||
"@angular/common/testing": "ng.common.testing",
|
||||
"@angular/core": "ng.core",
|
||||
"rxjs/Subject": "Rx"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/common/testing"
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
// This file is not used to build this module. It is only used during editing
|
||||
// by the TypeScript language serivce and during build for verifcation. `ngc`
|
||||
// by the TypeScript language service and during build for verification. `ngc`
|
||||
// replaces this file with production index.ts when it rewrites private symbol
|
||||
// names.
|
||||
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
"name": "@angular/common",
|
||||
"version": "0.0.0-PLACEHOLDER",
|
||||
"description": "Angular - commonly needed directives and services",
|
||||
"main": "bundles/common.umd.js",
|
||||
"module": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"main": "./bundles/common.umd.js",
|
||||
"module": "./@angular/common.es5.js",
|
||||
"es2015": "./@angular/common.js",
|
||||
"typings": "./typings/common.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/common/testing/index.js',
|
||||
dest: '../../../dist/packages-dist/common/bundles/common-testing.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.common.testing',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/common': 'ng.common',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/Subject': 'Rx'
|
||||
}
|
||||
};
|
|
@ -1,19 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/common/index.js',
|
||||
dest: '../../../dist/packages-dist/common/bundles/common.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.common',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/Subject': 'Rx',
|
||||
}
|
||||
};
|
|
@ -13,7 +13,7 @@
|
|||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es5",
|
||||
"target": "es2015",
|
||||
"skipLibCheck": true,
|
||||
"lib": [ "es2015", "dom" ],
|
||||
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
"extends": "./tsconfig-build",
|
||||
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../dist/packages-dist/common",
|
||||
"paths": {
|
||||
"@angular/core": ["../../../dist/packages-dist/core/"],
|
||||
"@angular/common": ["../../../dist/packages-dist/common"]
|
||||
},
|
||||
"target": "es5"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"testing/index.ts",
|
||||
|
|
|
@ -106,7 +106,7 @@ This CLI is intended for demos, prototyping, or for users with simple build syst
|
|||
that run bare `tsc`.
|
||||
|
||||
Users with a build system should expect an Angular template plugin. Such a plugin would be
|
||||
based on the `index.ts` in this directory, but should share the TypeScript compiler instance
|
||||
based on the `public_api.ts` in this directory, but should share the TypeScript compiler instance
|
||||
with the one already used in the plugin for TypeScript typechecking and emit.
|
||||
|
||||
## Design
|
||||
|
|
|
@ -11,4 +11,5 @@ module.exports = {
|
|||
entry: './test/all_spec.js',
|
||||
output: {filename: './all_spec.js'},
|
||||
resolve: {extensions: ['.js']},
|
||||
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"version": "0.0.0-PLACEHOLDER",
|
||||
"description": "Angular - the compiler CLI for Node.js",
|
||||
"main": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"typings": "./typings/index.d.ts",
|
||||
"bin": {
|
||||
"ngc": "./src/main.js",
|
||||
"ng-xi18n": "./src/extract_i18n.js"
|
||||
|
|
|
@ -18,7 +18,7 @@ const NODE_MODULES = '/node_modules/';
|
|||
const IS_GENERATED = /\.(ngfactory|ngstyle)$/;
|
||||
const GENERATED_FILES = /\.ngfactory\.ts$|\.ngstyle\.ts$/;
|
||||
const GENERATED_OR_DTS_FILES = /\.d\.ts$|\.ngfactory\.ts$|\.ngstyle\.ts$/;
|
||||
const SHALLOW_IMPORT = /^(\w+|(\@\w+\/\w+))$/;
|
||||
const SHALLOW_IMPORT = /^((\w|-)+|(@(\w|-)+\/(\w|-)+))$/;
|
||||
|
||||
export interface CompilerHostContext extends ts.ModuleResolutionHost {
|
||||
readResource(fileName: string): Promise<string>;
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/core": "ng.core",
|
||||
"@angular/core/testing": "ng.core.testing",
|
||||
"@angular/compiler": "ng.compiler",
|
||||
"rxjs/Observable": "Rx",
|
||||
"rxjs/Subject": "Rx"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/core/testing"
|
||||
}
|
|
@ -9,59 +9,8 @@
|
|||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Entry point for all APIs of the compiler package.
|
||||
*
|
||||
* <div class="callout is-critical">
|
||||
* <header>Unstable APIs</header>
|
||||
* <p>
|
||||
* All compiler apis are currently considered experimental and private!
|
||||
* </p>
|
||||
* <p>
|
||||
* We expect the APIs in this package to keep on changing. Do not rely on them.
|
||||
* </p>
|
||||
* </div>
|
||||
* Entry point for all public APIs of the compiler package.
|
||||
*/
|
||||
export {VERSION} from './src/version';
|
||||
export * from './src/template_parser/template_ast';
|
||||
export {TEMPLATE_TRANSFORMS} from './src/template_parser/template_parser';
|
||||
export {CompilerConfig, RenderTypes} from './src/config';
|
||||
export * from './src/compile_metadata';
|
||||
export * from './src/aot/compiler_factory';
|
||||
export * from './src/aot/compiler';
|
||||
export * from './src/aot/compiler_options';
|
||||
export * from './src/aot/compiler_host';
|
||||
export * from './src/aot/static_reflector';
|
||||
export * from './src/aot/static_reflection_capabilities';
|
||||
export * from './src/aot/static_symbol';
|
||||
export * from './src/aot/static_symbol_resolver';
|
||||
export * from './src/aot/summary_resolver';
|
||||
export * from './src/summary_resolver';
|
||||
export {JitCompiler} from './src/jit/compiler';
|
||||
export * from './src/jit/compiler_factory';
|
||||
export * from './src/url_resolver';
|
||||
export * from './src/resource_loader';
|
||||
export {DirectiveResolver} from './src/directive_resolver';
|
||||
export {PipeResolver} from './src/pipe_resolver';
|
||||
export {NgModuleResolver} from './src/ng_module_resolver';
|
||||
export {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from './src/ml_parser/interpolation_config';
|
||||
export * from './src/schema/element_schema_registry';
|
||||
export * from './src/i18n/index';
|
||||
export * from './src/directive_normalizer';
|
||||
export * from './src/expression_parser/lexer';
|
||||
export * from './src/expression_parser/parser';
|
||||
export * from './src/metadata_resolver';
|
||||
export * from './src/ml_parser/html_parser';
|
||||
export * from './src/ml_parser/interpolation_config';
|
||||
export {NgModuleCompiler} from './src/ng_module_compiler';
|
||||
export {DirectiveWrapperCompiler} from './src/directive_wrapper_compiler';
|
||||
export * from './src/output/path_util';
|
||||
export * from './src/output/ts_emitter';
|
||||
export * from './src/parse_util';
|
||||
export * from './src/schema/dom_element_schema_registry';
|
||||
export * from './src/selector';
|
||||
export * from './src/style_compiler';
|
||||
export * from './src/template_parser/template_parser';
|
||||
export {ViewCompiler} from './src/view_compiler/view_compiler';
|
||||
export {AnimationParser} from './src/animation/animation_parser';
|
||||
export {isSyntaxError, syntaxError} from './src/util';
|
||||
export * from './src/compiler';
|
||||
|
||||
// This file only reexports content of the `src` folder. Keep it that way.
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
"name": "@angular/compiler",
|
||||
"version": "0.0.0-PLACEHOLDER",
|
||||
"description": "Angular - the compiler library",
|
||||
"main": "bundles/compiler.umd.js",
|
||||
"module": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"main": "./bundles/compiler.umd.js",
|
||||
"module": "./@angular/compiler.es5.js",
|
||||
"es2015": "./@angular/compiler.js",
|
||||
"typings": "./typings/compiler.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/compiler/testing/index.js',
|
||||
dest: '../../../dist/packages-dist/compiler/bundles/compiler-testing.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.compiler.testing',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/core/testing': 'ng.core.testing',
|
||||
'@angular/compiler': 'ng.compiler',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/Subject': 'Rx'
|
||||
}
|
||||
};
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/compiler/index.js',
|
||||
entry: '../../../dist/packages-dist/compiler/es5/index.js',
|
||||
dest: '../../../dist/packages-dist/compiler/bundles/compiler.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.compiler',
|
|
@ -6,7 +6,10 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ChangeDetectionStrategy, ComponentFactory, ComponentRenderTypeV2, SchemaMetadata, Type, ViewEncapsulation, ɵLifecycleHooks, ɵreflector} from '@angular/core';
|
||||
import {
|
||||
ChangeDetectionStrategy, ComponentFactory, SchemaMetadata, Type, ViewEncapsulation, ɵLifecycleHooks, ɵreflector,
|
||||
RendererTypeV2
|
||||
} from '@angular/core';
|
||||
|
||||
import {StaticSymbol} from './aot/static_symbol';
|
||||
import {ListWrapper} from './facade/collection';
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
/**
|
||||
* @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 APIs of the compiler package.
|
||||
*
|
||||
* <div class="callout is-critical">
|
||||
* <header>Unstable APIs</header>
|
||||
* <p>
|
||||
* All compiler apis are currently considered experimental and private!
|
||||
* </p>
|
||||
* <p>
|
||||
* We expect the APIs in this package to keep on changing. Do not rely on them.
|
||||
* </p>
|
||||
* </div>
|
||||
*/
|
||||
export {VERSION} from './version';
|
||||
export * from './template_parser/template_ast';
|
||||
export {TEMPLATE_TRANSFORMS} from './template_parser/template_parser';
|
||||
export {CompilerConfig, RenderTypes} from './config';
|
||||
export * from './compile_metadata';
|
||||
export * from './aot/compiler_factory';
|
||||
export * from './aot/compiler';
|
||||
export * from './aot/compiler_host';
|
||||
export * from './aot/static_reflector';
|
||||
export * from './aot/static_reflection_capabilities';
|
||||
export * from './aot/static_symbol';
|
||||
export * from './aot/static_symbol_resolver';
|
||||
export * from './aot/summary_resolver';
|
||||
export * from './summary_resolver';
|
||||
export {JitCompiler} from './jit/compiler';
|
||||
export * from './jit/compiler_factory';
|
||||
export * from './url_resolver';
|
||||
export * from './resource_loader';
|
||||
export {DirectiveResolver} from './directive_resolver';
|
||||
export {PipeResolver} from './pipe_resolver';
|
||||
export {NgModuleResolver} from './ng_module_resolver';
|
||||
export {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from './ml_parser/interpolation_config';
|
||||
export * from './schema/element_schema_registry';
|
||||
export * from './i18n/index';
|
||||
export * from './directive_normalizer';
|
||||
export * from './expression_parser/ast';
|
||||
export * from './expression_parser/lexer';
|
||||
export * from './expression_parser/parser';
|
||||
export * from './metadata_resolver';
|
||||
export * from './ml_parser/ast';
|
||||
export * from './ml_parser/html_parser';
|
||||
export * from './ml_parser/html_tags';
|
||||
export * from './ml_parser/interpolation_config';
|
||||
export * from './ml_parser/tags';
|
||||
export {NgModuleCompiler} from './ng_module_compiler';
|
||||
export {DirectiveWrapperCompiler} from './directive_wrapper_compiler';
|
||||
export * from './output/path_util';
|
||||
export * from './output/ts_emitter';
|
||||
export * from './parse_util';
|
||||
export * from './schema/dom_element_schema_registry';
|
||||
export * from './selector';
|
||||
export * from './style_compiler';
|
||||
export * from './template_parser/template_parser';
|
||||
export {ViewCompiler} from './view_compiler/view_compiler';
|
||||
export {AnimationParser} from './animation/animation_parser';
|
||||
export {isSyntaxError, syntaxError} from './util';
|
||||
// This file only reexports content of the `src` folder. Keep it that way.
|
|
@ -6,7 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ANALYZE_FOR_ENTRY_COMPONENTS, ChangeDetectionStrategy, ChangeDetectorRef, ComponentFactory, ComponentFactoryResolver, ComponentRef, ElementRef, Injector, LOCALE_ID, NgModuleFactory, QueryList, RenderComponentType, Renderer, RendererTypeV2, SecurityContext, SimpleChange, TRANSLATIONS_FORMAT, TemplateRef, ViewContainerRef, ViewEncapsulation, ɵAnimationGroupPlayer, ɵAnimationKeyframe, ɵAnimationSequencePlayer, ɵAnimationStyles, ɵAnimationTransition, ɵAppView, ɵChangeDetectorStatus, ɵCodegenComponentFactoryResolver, ɵComponentRef_, ɵDebugAppView, ɵDebugContext, ɵNgModuleInjector, ɵNoOpAnimationPlayer, ɵStaticNodeDebugInfo, ɵTemplateRef_, ɵValueUnwrapper, ɵViewContainer, ɵViewType, ɵbalanceAnimationKeyframes, ɵclearStyles, ɵcollectAndResolveStyles, ɵdevModeEqual, ɵprepareFinalAnimationStyles, ɵreflector, ɵregisterModuleFactory, ɵrenderStyles, ɵviewEngine, ɵview_utils} from '@angular/core';
|
||||
import {ANALYZE_FOR_ENTRY_COMPONENTS, ChangeDetectionStrategy, ChangeDetectorRef, ComponentFactory, ComponentFactoryResolver, ComponentRef, ElementRef, Injector, LOCALE_ID, NgModuleFactory, QueryList, RenderComponentType, Renderer, SecurityContext, SimpleChange, TRANSLATIONS_FORMAT, TemplateRef, ViewContainerRef, ViewEncapsulation, ɵAnimationGroupPlayer, ɵAnimationKeyframe, ɵAnimationSequencePlayer, ɵAnimationStyles, ɵAnimationTransition, ɵAppView, ɵChangeDetectorStatus, ɵCodegenComponentFactoryResolver, ɵComponentRef_, ɵDebugAppView, ɵDebugContext, ɵEMPTY_ARRAY, ɵEMPTY_INLINE_ARRAY, ɵEMPTY_MAP, ɵInlineArray16, ɵInlineArray2, ɵInlineArray4, ɵInlineArray8, ɵInlineArrayDynamic, ɵNgModuleInjector, ɵNoOpAnimationPlayer, ɵStaticNodeDebugInfo, ɵTemplateRef_, ɵValueUnwrapper, ɵViewContainer, ɵViewType, ɵViewUtils, ɵanchorDef, ɵbalanceAnimationKeyframes, ɵcastByValue, ɵcheckBinding, ɵcheckBindingChange, ɵcheckRenderAttribute, ɵcheckRenderClass, ɵcheckRenderProperty, ɵcheckRenderStyle, ɵcheckRenderText, ɵclearStyles, ɵcollectAndResolveStyles, ɵcreateRendererTypeV2, ɵcreateRenderComponentType, ɵcreateRenderElement, ɵdevModeEqual, ɵdirectiveDef, ɵelementDef, ɵinlineInterpolate, ɵinterpolate, ɵngContentDef, ɵnodeValue, ɵnoop, ɵpipeDef, ɵprepareFinalAnimationStyles, ɵproviderDef, ɵpureArrayDef, ɵpureObjectDef, ɵpurePipeDef, ɵpureProxy1, ɵpureProxy10, ɵpureProxy2, ɵpureProxy3, ɵpureProxy4, ɵpureProxy5, ɵpureProxy6, ɵpureProxy7, ɵpureProxy8, ɵpureProxy9, ɵqueryDef, ɵreflector, ɵregisterModuleFactory, ɵrenderStyles, ɵselectOrCreateRenderHostElement, ɵsetBindingDebugInfo, ɵsetBindingDebugInfoForChanges, ɵsubscribeToRenderElement, ɵtextDef, ɵunwrapValue, ɵviewDef} from '@angular/core';
|
||||
|
||||
import {CompileIdentifierMetadata, CompileTokenMetadata} from './compile_metadata';
|
||||
|
||||
|
@ -16,7 +16,6 @@ const VIEW_UTILS_MODULE_URL = assetUrl('core', 'linker/view_utils');
|
|||
export interface IdentifierSpec {
|
||||
name: string;
|
||||
moduleUrl: string;
|
||||
member?: string;
|
||||
runtime: any;
|
||||
}
|
||||
|
||||
|
@ -26,8 +25,7 @@ export class Identifiers {
|
|||
moduleUrl: CORE,
|
||||
runtime: ANALYZE_FOR_ENTRY_COMPONENTS
|
||||
};
|
||||
static ViewUtils: IdentifierSpec =
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'ViewUtils', runtime: ɵview_utils.ViewUtils};
|
||||
static ViewUtils: IdentifierSpec = {name: 'ɵViewUtils', moduleUrl: CORE, runtime: ɵViewUtils};
|
||||
static AppView: IdentifierSpec = {name: 'ɵAppView', moduleUrl: CORE, runtime: ɵAppView};
|
||||
static DebugAppView:
|
||||
IdentifierSpec = {name: 'ɵDebugAppView', moduleUrl: CORE, runtime: ɵDebugAppView};
|
||||
|
@ -101,100 +99,59 @@ export class Identifiers {
|
|||
moduleUrl: CORE,
|
||||
runtime: ɵChangeDetectorStatus
|
||||
};
|
||||
static checkBinding: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'checkBinding',
|
||||
runtime: ɵview_utils.checkBinding
|
||||
};
|
||||
static checkBindingChange: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'checkBindingChange',
|
||||
runtime: ɵview_utils.checkBindingChange
|
||||
};
|
||||
static checkRenderText: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'checkRenderText',
|
||||
runtime: ɵview_utils.checkRenderText
|
||||
};
|
||||
static checkBinding:
|
||||
IdentifierSpec = {name: 'ɵcheckBinding', moduleUrl: CORE, runtime: ɵcheckBinding};
|
||||
static checkBindingChange:
|
||||
IdentifierSpec = {name: 'ɵcheckBindingChange', moduleUrl: CORE, runtime: ɵcheckBindingChange};
|
||||
static checkRenderText:
|
||||
IdentifierSpec = {name: 'ɵcheckRenderText', moduleUrl: CORE, runtime: ɵcheckRenderText};
|
||||
static checkRenderProperty: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
name: 'ɵcheckRenderProperty',
|
||||
moduleUrl: CORE,
|
||||
member: 'checkRenderProperty',
|
||||
runtime: ɵview_utils.checkRenderProperty
|
||||
runtime: ɵcheckRenderProperty
|
||||
};
|
||||
static checkRenderAttribute: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
name: 'ɵcheckRenderAttribute',
|
||||
moduleUrl: CORE,
|
||||
member: 'checkRenderAttribute',
|
||||
runtime: ɵview_utils.checkRenderAttribute
|
||||
};
|
||||
static checkRenderClass: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'checkRenderClass',
|
||||
runtime: ɵview_utils.checkRenderClass
|
||||
};
|
||||
static checkRenderStyle: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'checkRenderStyle',
|
||||
runtime: ɵview_utils.checkRenderStyle
|
||||
runtime: ɵcheckRenderAttribute
|
||||
};
|
||||
static checkRenderClass:
|
||||
IdentifierSpec = {name: 'ɵcheckRenderClass', moduleUrl: CORE, runtime: ɵcheckRenderClass};
|
||||
static checkRenderStyle:
|
||||
IdentifierSpec = {name: 'ɵcheckRenderStyle', moduleUrl: CORE, runtime: ɵcheckRenderStyle};
|
||||
static devModeEqual:
|
||||
IdentifierSpec = {name: 'ɵdevModeEqual', moduleUrl: CORE, runtime: ɵdevModeEqual};
|
||||
static inlineInterpolate: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'inlineInterpolate',
|
||||
runtime: ɵview_utils.inlineInterpolate
|
||||
};
|
||||
static interpolate: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'interpolate',
|
||||
runtime: ɵview_utils.interpolate
|
||||
};
|
||||
static castByValue: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'castByValue',
|
||||
runtime: ɵview_utils.castByValue
|
||||
};
|
||||
static EMPTY_ARRAY: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'EMPTY_ARRAY',
|
||||
runtime: ɵview_utils.EMPTY_ARRAY
|
||||
};
|
||||
static EMPTY_MAP: IdentifierSpec =
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'EMPTY_MAP', runtime: ɵview_utils.EMPTY_MAP};
|
||||
static inlineInterpolate:
|
||||
IdentifierSpec = {name: 'ɵinlineInterpolate', moduleUrl: CORE, runtime: ɵinlineInterpolate};
|
||||
static interpolate:
|
||||
IdentifierSpec = {name: 'ɵinterpolate', moduleUrl: CORE, runtime: ɵinterpolate};
|
||||
static castByValue:
|
||||
IdentifierSpec = {name: 'ɵcastByValue', moduleUrl: CORE, runtime: ɵcastByValue};
|
||||
static EMPTY_ARRAY:
|
||||
IdentifierSpec = {name: 'ɵEMPTY_ARRAY', moduleUrl: CORE, runtime: ɵEMPTY_ARRAY};
|
||||
static EMPTY_MAP: IdentifierSpec = {name: 'ɵEMPTY_MAP', moduleUrl: CORE, runtime: ɵEMPTY_MAP};
|
||||
static createRenderElement: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
name: 'ɵcreateRenderElement',
|
||||
moduleUrl: CORE,
|
||||
member: 'createRenderElement',
|
||||
runtime: ɵview_utils.createRenderElement
|
||||
runtime: ɵcreateRenderElement
|
||||
};
|
||||
static selectOrCreateRenderHostElement: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
name: 'ɵselectOrCreateRenderHostElement',
|
||||
moduleUrl: CORE,
|
||||
member: 'selectOrCreateRenderHostElement',
|
||||
runtime: ɵview_utils.selectOrCreateRenderHostElement
|
||||
runtime: ɵselectOrCreateRenderHostElement
|
||||
};
|
||||
static pureProxies: IdentifierSpec[] = [
|
||||
null,
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'pureProxy1', runtime: ɵview_utils.pureProxy1},
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'pureProxy2', runtime: ɵview_utils.pureProxy2},
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'pureProxy3', runtime: ɵview_utils.pureProxy3},
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'pureProxy4', runtime: ɵview_utils.pureProxy4},
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'pureProxy5', runtime: ɵview_utils.pureProxy5},
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'pureProxy6', runtime: ɵview_utils.pureProxy6},
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'pureProxy7', runtime: ɵview_utils.pureProxy7},
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'pureProxy8', runtime: ɵview_utils.pureProxy8},
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'pureProxy9', runtime: ɵview_utils.pureProxy9},
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'pureProxy10', runtime: ɵview_utils.pureProxy10},
|
||||
{name: 'ɵpureProxy1', moduleUrl: CORE, runtime: ɵpureProxy1},
|
||||
{name: 'ɵpureProxy2', moduleUrl: CORE, runtime: ɵpureProxy2},
|
||||
{name: 'ɵpureProxy3', moduleUrl: CORE, runtime: ɵpureProxy3},
|
||||
{name: 'ɵpureProxy4', moduleUrl: CORE, runtime: ɵpureProxy4},
|
||||
{name: 'ɵpureProxy5', moduleUrl: CORE, runtime: ɵpureProxy5},
|
||||
{name: 'ɵpureProxy6', moduleUrl: CORE, runtime: ɵpureProxy6},
|
||||
{name: 'ɵpureProxy7', moduleUrl: CORE, runtime: ɵpureProxy7},
|
||||
{name: 'ɵpureProxy8', moduleUrl: CORE, runtime: ɵpureProxy8},
|
||||
{name: 'ɵpureProxy9', moduleUrl: CORE, runtime: ɵpureProxy9},
|
||||
{name: 'ɵpureProxy10', moduleUrl: CORE, runtime: ɵpureProxy10},
|
||||
];
|
||||
static SecurityContext: IdentifierSpec = {
|
||||
name: 'SecurityContext',
|
||||
|
@ -243,16 +200,14 @@ export class Identifiers {
|
|||
static TRANSLATIONS_FORMAT:
|
||||
IdentifierSpec = {name: 'TRANSLATIONS_FORMAT', moduleUrl: CORE, runtime: TRANSLATIONS_FORMAT};
|
||||
static setBindingDebugInfo: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
name: 'ɵsetBindingDebugInfo',
|
||||
moduleUrl: CORE,
|
||||
member: 'setBindingDebugInfo',
|
||||
runtime: ɵview_utils.setBindingDebugInfo
|
||||
runtime: ɵsetBindingDebugInfo
|
||||
};
|
||||
static setBindingDebugInfoForChanges: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
name: 'ɵsetBindingDebugInfoForChanges',
|
||||
moduleUrl: CORE,
|
||||
member: 'setBindingDebugInfoForChanges',
|
||||
runtime: ɵview_utils.setBindingDebugInfoForChanges
|
||||
runtime: ɵsetBindingDebugInfoForChanges
|
||||
};
|
||||
static AnimationTransition: IdentifierSpec = {
|
||||
name: 'ɵAnimationTransition',
|
||||
|
@ -264,127 +219,55 @@ export class Identifiers {
|
|||
static InlineArray:
|
||||
IdentifierSpec = {name: 'InlineArray', moduleUrl: VIEW_UTILS_MODULE_URL, runtime: null};
|
||||
static inlineArrays: IdentifierSpec[] = [
|
||||
{
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'InlineArray2',
|
||||
runtime: ɵview_utils.InlineArray2
|
||||
},
|
||||
{
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'InlineArray2',
|
||||
runtime: ɵview_utils.InlineArray2
|
||||
},
|
||||
{
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'InlineArray4',
|
||||
runtime: ɵview_utils.InlineArray4
|
||||
},
|
||||
{
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'InlineArray8',
|
||||
runtime: ɵview_utils.InlineArray8
|
||||
},
|
||||
{
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'InlineArray16',
|
||||
runtime: ɵview_utils.InlineArray16
|
||||
},
|
||||
{name: 'ɵInlineArray2', moduleUrl: CORE, runtime: ɵInlineArray2},
|
||||
{name: 'ɵInlineArray2', moduleUrl: CORE, runtime: ɵInlineArray2},
|
||||
{name: 'ɵInlineArray4', moduleUrl: CORE, runtime: ɵInlineArray4},
|
||||
{name: 'ɵInlineArray8', moduleUrl: CORE, runtime: ɵInlineArray8},
|
||||
{name: 'ɵInlineArray16', moduleUrl: CORE, runtime: ɵInlineArray16},
|
||||
];
|
||||
static EMPTY_INLINE_ARRAY: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'EMPTY_INLINE_ARRAY',
|
||||
runtime: ɵview_utils.EMPTY_INLINE_ARRAY
|
||||
};
|
||||
static InlineArrayDynamic: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
moduleUrl: CORE,
|
||||
member: 'InlineArrayDynamic',
|
||||
runtime: ɵview_utils.InlineArrayDynamic
|
||||
};
|
||||
static EMPTY_INLINE_ARRAY:
|
||||
IdentifierSpec = {name: 'ɵEMPTY_INLINE_ARRAY', moduleUrl: CORE, runtime: ɵEMPTY_INLINE_ARRAY};
|
||||
static InlineArrayDynamic:
|
||||
IdentifierSpec = {name: 'ɵInlineArrayDynamic', moduleUrl: CORE, runtime: ɵInlineArrayDynamic};
|
||||
static subscribeToRenderElement: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
name: 'ɵsubscribeToRenderElement',
|
||||
moduleUrl: CORE,
|
||||
member: 'subscribeToRenderElement',
|
||||
runtime: ɵview_utils.subscribeToRenderElement
|
||||
runtime: ɵsubscribeToRenderElement
|
||||
};
|
||||
static createRenderComponentType: IdentifierSpec = {
|
||||
name: 'ɵview_utils',
|
||||
name: 'ɵcreateRenderComponentType',
|
||||
moduleUrl: CORE,
|
||||
member: 'createRenderComponentType',
|
||||
runtime: ɵview_utils.createRenderComponentType
|
||||
runtime: ɵcreateRenderComponentType
|
||||
};
|
||||
|
||||
|
||||
static noop: IdentifierSpec =
|
||||
{name: 'ɵview_utils', moduleUrl: CORE, member: 'noop', runtime: ɵview_utils.noop};
|
||||
static noop: IdentifierSpec = {name: 'ɵnoop', moduleUrl: CORE, runtime: ɵnoop};
|
||||
|
||||
static viewDef: IdentifierSpec =
|
||||
{name: 'ɵviewEngine', moduleUrl: CORE, member: 'viewDef', runtime: ɵviewEngine.viewDef};
|
||||
static elementDef: IdentifierSpec =
|
||||
{name: 'ɵviewEngine', moduleUrl: CORE, member: 'elementDef', runtime: ɵviewEngine.elementDef};
|
||||
static anchorDef: IdentifierSpec =
|
||||
{name: 'ɵviewEngine', moduleUrl: CORE, member: 'anchorDef', runtime: ɵviewEngine.anchorDef};
|
||||
static textDef: IdentifierSpec =
|
||||
{name: 'ɵviewEngine', moduleUrl: CORE, member: 'textDef', runtime: ɵviewEngine.textDef};
|
||||
static directiveDef: IdentifierSpec = {
|
||||
name: 'ɵviewEngine',
|
||||
moduleUrl: CORE,
|
||||
member: 'directiveDef',
|
||||
runtime: ɵviewEngine.directiveDef
|
||||
};
|
||||
static providerDef: IdentifierSpec = {
|
||||
name: 'ɵviewEngine',
|
||||
moduleUrl: CORE,
|
||||
member: 'providerDef',
|
||||
runtime: ɵviewEngine.providerDef
|
||||
};
|
||||
static queryDef: IdentifierSpec =
|
||||
{name: 'ɵviewEngine', moduleUrl: CORE, member: 'queryDef', runtime: ɵviewEngine.queryDef};
|
||||
static pureArrayDef: IdentifierSpec = {
|
||||
name: 'ɵviewEngine',
|
||||
moduleUrl: CORE,
|
||||
member: 'pureArrayDef',
|
||||
runtime: ɵviewEngine.pureArrayDef
|
||||
};
|
||||
static pureObjectDef: IdentifierSpec = {
|
||||
name: 'ɵviewEngine',
|
||||
moduleUrl: CORE,
|
||||
member: 'pureObjectDef',
|
||||
runtime: ɵviewEngine.pureObjectDef
|
||||
};
|
||||
static purePipeDef: IdentifierSpec = {
|
||||
name: 'ɵviewEngine',
|
||||
moduleUrl: CORE,
|
||||
member: 'purePipeDef',
|
||||
runtime: ɵviewEngine.purePipeDef
|
||||
};
|
||||
static pipeDef: IdentifierSpec =
|
||||
{name: 'ɵviewEngine', moduleUrl: CORE, member: 'pipeDef', runtime: ɵviewEngine.pipeDef};
|
||||
static nodeValue: IdentifierSpec =
|
||||
{name: 'ɵviewEngine', moduleUrl: CORE, member: 'nodeValue', runtime: ɵviewEngine.nodeValue};
|
||||
static ngContentDef: IdentifierSpec = {
|
||||
name: 'ɵviewEngine',
|
||||
moduleUrl: CORE,
|
||||
member: 'ngContentDef',
|
||||
runtime: ɵviewEngine.ngContentDef
|
||||
};
|
||||
static unwrapValue: IdentifierSpec = {
|
||||
name: 'ɵviewEngine',
|
||||
moduleUrl: CORE,
|
||||
member: 'unwrapValue',
|
||||
runtime: ɵviewEngine.unwrapValue
|
||||
};
|
||||
static viewDef: IdentifierSpec = {name: 'ɵviewDef', moduleUrl: CORE, runtime: ɵviewDef};
|
||||
static elementDef: IdentifierSpec = {name: 'ɵelementDef', moduleUrl: CORE, runtime: ɵelementDef};
|
||||
static anchorDef: IdentifierSpec = {name: 'ɵanchorDef', moduleUrl: CORE, runtime: ɵanchorDef};
|
||||
static textDef: IdentifierSpec = {name: 'ɵtextDef', moduleUrl: CORE, runtime: ɵtextDef};
|
||||
static directiveDef:
|
||||
IdentifierSpec = {name: 'ɵdirectiveDef', moduleUrl: CORE, runtime: ɵdirectiveDef};
|
||||
static providerDef:
|
||||
IdentifierSpec = {name: 'ɵproviderDef', moduleUrl: CORE, runtime: ɵproviderDef};
|
||||
static queryDef: IdentifierSpec = {name: 'ɵqueryDef', moduleUrl: CORE, runtime: ɵqueryDef};
|
||||
static pureArrayDef:
|
||||
IdentifierSpec = {name: 'ɵpureArrayDef', moduleUrl: CORE, runtime: ɵpureArrayDef};
|
||||
static pureObjectDef:
|
||||
IdentifierSpec = {name: 'ɵpureObjectRef', moduleUrl: CORE, runtime: ɵpureObjectDef};
|
||||
static purePipeDef:
|
||||
IdentifierSpec = {name: 'ɵpurePipeDef', moduleUrl: CORE, runtime: ɵpurePipeDef};
|
||||
static pipeDef: IdentifierSpec = {name: 'ɵpipeDef', moduleUrl: CORE, runtime: ɵpipeDef};
|
||||
static nodeValue: IdentifierSpec = {name: 'ɵnodeValue', moduleUrl: CORE, runtime: ɵnodeValue};
|
||||
static ngContentDef:
|
||||
IdentifierSpec = {name: 'ɵngContentDef', moduleUrl: CORE, runtime: ɵngContentDef};
|
||||
static unwrapValue:
|
||||
IdentifierSpec = {name: 'ɵunwrapValue', moduleUrl: CORE, runtime: ɵunwrapValue};
|
||||
static createRendererTypeV2: IdentifierSpec = {
|
||||
name: 'ɵviewEngine',
|
||||
name: 'ɵcreateRendererTypeV2',
|
||||
moduleUrl: CORE,
|
||||
member: 'createRendererTypeV2',
|
||||
runtime: ɵviewEngine.createRendererTypeV2
|
||||
runtime: ɵcreateRendererTypeV2
|
||||
};
|
||||
static RendererTypeV2: IdentifierSpec = {
|
||||
name: 'RendererTypeV2',
|
||||
|
@ -417,8 +300,7 @@ export function assetUrl(pkg: string, path: string = null, type: string = 'src')
|
|||
|
||||
export function resolveIdentifier(identifier: IdentifierSpec) {
|
||||
let name = identifier.name;
|
||||
let members = identifier.member && [identifier.member];
|
||||
return ɵreflector.resolveIdentifier(name, identifier.moduleUrl, members, identifier.runtime);
|
||||
return ɵreflector.resolveIdentifier(name, identifier.moduleUrl, null, identifier.runtime);
|
||||
}
|
||||
|
||||
export function createIdentifier(identifier: IdentifierSpec): CompileIdentifierMetadata {
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
* A replacement for @Injectable to be used in the compiler, so that
|
||||
* we don't try to evaluate the metadata in the compiler during AoT.
|
||||
* This decorator is enough to make the compiler work with the ReflectiveInjector though.
|
||||
* @Annotation
|
||||
*/
|
||||
export function CompilerInjectable(): (data: any) => any {
|
||||
return (x) => x;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Compiler, ComponentFactory, ComponentRenderTypeV2, Inject, Injector, ModuleWithComponentFactories, NgModuleFactory, Type, ɵview_utils as view_utils} from '@angular/core';
|
||||
import {Compiler, ComponentFactory, Inject, Injector, ModuleWithComponentFactories, NgModuleFactory, Type, ɵgetComponentFactoryViewClass as getComponentFactoryViewClass} from '@angular/core';
|
||||
|
||||
import {AnimationCompiler} from '../animation/animation_compiler';
|
||||
import {AnimationParser} from '../animation/animation_parser';
|
||||
|
@ -221,7 +221,7 @@ export class JitCompiler implements Compiler {
|
|||
const componentFactory = <ComponentFactory<any>>compMeta.componentFactory;
|
||||
const hostClass = this._metadataResolver.getHostComponentType(compType);
|
||||
const hostMeta = createHostComponentMeta(
|
||||
hostClass, compMeta, <any>view_utils.getComponentFactoryViewClass(componentFactory));
|
||||
hostClass, compMeta, <any>getComponentFactoryViewClass(componentFactory));
|
||||
compiledTemplate =
|
||||
new CompiledTemplate(true, compMeta.type, hostMeta, ngModule, [compMeta.type]);
|
||||
this._compiledHostTemplateCache.set(compType, compiledTemplate);
|
||||
|
|
|
@ -6,7 +6,14 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {AnimationAnimateMetadata, AnimationEntryMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata, AnimationMetadata, AnimationStateDeclarationMetadata, AnimationStateMetadata, AnimationStateTransitionMetadata, AnimationStyleMetadata, AnimationWithStepsMetadata, Attribute, ChangeDetectionStrategy, Component, ComponentFactory, ComponentRenderTypeV2, Directive, Host, Inject, Injectable, InjectionToken, ModuleWithProviders, Optional, Provider, Query, SchemaMetadata, Self, SkipSelf, Type, resolveForwardRef, ɵERROR_COMPONENT_TYPE, ɵLIFECYCLE_HOOKS_VALUES, ɵReflectorReader, ɵreflector, ɵviewEngine} from '@angular/core';
|
||||
import {
|
||||
AnimationAnimateMetadata, AnimationEntryMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata,
|
||||
AnimationMetadata, AnimationStateDeclarationMetadata, AnimationStateMetadata, AnimationStateTransitionMetadata,
|
||||
AnimationStyleMetadata, AnimationWithStepsMetadata, Attribute, ChangeDetectionStrategy, Component, ComponentFactory,
|
||||
Directive, Host, Inject, Injectable, InjectionToken, ModuleWithProviders, Optional, Provider, Query, SchemaMetadata,
|
||||
Self, SkipSelf, Type, resolveForwardRef, ɵERROR_COMPONENT_TYPE, ɵLIFECYCLE_HOOKS_VALUES, ɵReflectorReader,
|
||||
ɵcreateComponentFactory as createComponentFactory, ɵreflector, RendererTypeV2
|
||||
} from '@angular/core';
|
||||
|
||||
import {StaticSymbol, StaticSymbolCache} from './aot/static_symbol';
|
||||
import {ngfactoryFilePath} from './aot/util';
|
||||
|
@ -151,7 +158,7 @@ export class CompileMetadataResolver {
|
|||
} else {
|
||||
const hostView = this.getHostComponentViewClass(dirType);
|
||||
if (this._config.useViewEngine) {
|
||||
return ɵviewEngine.createComponentFactory(selector, dirType, <any>hostView);
|
||||
return createComponentFactory(selector, dirType, <any>hostView);
|
||||
} else {
|
||||
return new ComponentFactory(selector, <any>hostView, dirType);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ChangeDetectionStrategy, ViewEncapsulation, ɵLifecycleHooks as LifecycleHooks, ɵviewEngine as viewEngine} from '@angular/core';
|
||||
import {ChangeDetectionStrategy, ViewEncapsulation, ɵArgumentType as ArgumentType, ɵBindingType as BindingType, ɵDepFlags as DepFlags, ɵLifecycleHooks as LifecycleHooks, ɵNodeFlags as NodeFlags, ɵProviderType as ProviderType, ɵQueryBindingType as QueryBindingType, ɵQueryValueType as QueryValueType, ɵViewFlags as ViewFlags, ɵelementEventFullName as elementEventFullName} from '@angular/core';
|
||||
|
||||
import {AnimationEntryCompileResult} from '../animation/animation_compiler';
|
||||
import {CompileDiDependencyMetadata, CompileDirectiveMetadata, CompileDirectiveSummary, CompilePipeSummary, CompileProviderMetadata, CompileTokenMetadata, CompileTypeMetadata, identifierModuleUrl, identifierName, rendererTypeName, tokenReference, viewClassName} from '../compile_metadata';
|
||||
|
@ -130,12 +130,12 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
|||
// Note: queries start with id 1 so we can use the number in a Bloom filter!
|
||||
const queryId = queryIndex + 1;
|
||||
const bindingType =
|
||||
query.first ? viewEngine.QueryBindingType.First : viewEngine.QueryBindingType.All;
|
||||
let flags = viewEngine.NodeFlags.HasViewQuery;
|
||||
query.first ? QueryBindingType.First : QueryBindingType.All;
|
||||
let flags = NodeFlags.HasViewQuery;
|
||||
if (queryIds.staticQueryIds.has(queryId)) {
|
||||
flags |= viewEngine.NodeFlags.HasStaticQuery;
|
||||
flags |= NodeFlags.HasStaticQuery;
|
||||
} else {
|
||||
flags |= viewEngine.NodeFlags.HasDynamicQuery;
|
||||
flags |= NodeFlags.HasDynamicQuery;
|
||||
}
|
||||
this.nodeDefs.push(() => o.importExpr(createIdentifier(Identifiers.queryDef)).callFn([
|
||||
o.literal(flags), o.literal(queryId),
|
||||
|
@ -149,7 +149,7 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
|||
// if the view is empty, or an embedded view has a view container as last root nde,
|
||||
// create an additional root node.
|
||||
this.nodeDefs.push(() => o.importExpr(createIdentifier(Identifiers.anchorDef)).callFn([
|
||||
o.literal(viewEngine.NodeFlags.None), o.NULL_EXPR, o.NULL_EXPR, o.literal(0)
|
||||
o.literal(NodeFlags.None), o.NULL_EXPR, o.NULL_EXPR, o.literal(0)
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
@ -161,9 +161,9 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
|||
const updateRendererFn = this._createUpdateFn(this.updateRendererExpressions);
|
||||
|
||||
|
||||
let viewFlags = viewEngine.ViewFlags.None;
|
||||
let viewFlags = ViewFlags.None;
|
||||
if (!this.parent && this.component.changeDetection === ChangeDetectionStrategy.OnPush) {
|
||||
viewFlags |= viewEngine.ViewFlags.OnPush;
|
||||
viewFlags |= ViewFlags.OnPush;
|
||||
}
|
||||
const viewFactory = new o.DeclareFunctionStmt(
|
||||
this.viewName, [],
|
||||
|
@ -342,19 +342,17 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
|||
hostBindings: {value: AST, context: o.Expression}[],
|
||||
hostEvents: {context: o.Expression, eventAst: BoundEventAst}[],
|
||||
} {
|
||||
let flags = viewEngine.NodeFlags.None;
|
||||
let flags = NodeFlags.None;
|
||||
if (ast.hasViewContainer) {
|
||||
flags |= viewEngine.NodeFlags.HasEmbeddedViews;
|
||||
flags |= NodeFlags.HasEmbeddedViews;
|
||||
}
|
||||
const usedEvents = new Map<string, [string, string]>();
|
||||
ast.outputs.forEach((event) => {
|
||||
usedEvents.set(
|
||||
viewEngine.elementEventFullName(event.target, event.name), [event.target, event.name]);
|
||||
usedEvents.set(elementEventFullName(event.target, event.name), [event.target, event.name]);
|
||||
});
|
||||
ast.directives.forEach((dirAst) => {
|
||||
dirAst.hostEvents.forEach((event) => {
|
||||
usedEvents.set(
|
||||
viewEngine.elementEventFullName(event.target, event.name), [event.target, event.name]);
|
||||
usedEvents.set(elementEventFullName(event.target, event.name), [event.target, event.name]);
|
||||
});
|
||||
});
|
||||
const hostBindings: {value: AST, context: o.Expression}[] = [];
|
||||
|
@ -388,11 +386,11 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
|||
ast.queryMatches.forEach((match) => {
|
||||
let valueType: number;
|
||||
if (tokenReference(match.value) === resolveIdentifier(Identifiers.ElementRef)) {
|
||||
valueType = viewEngine.QueryValueType.ElementRef;
|
||||
valueType = QueryValueType.ElementRef;
|
||||
} else if (tokenReference(match.value) === resolveIdentifier(Identifiers.ViewContainerRef)) {
|
||||
valueType = viewEngine.QueryValueType.ViewContainerRef;
|
||||
valueType = QueryValueType.ViewContainerRef;
|
||||
} else if (tokenReference(match.value) === resolveIdentifier(Identifiers.TemplateRef)) {
|
||||
valueType = viewEngine.QueryValueType.TemplateRef;
|
||||
valueType = QueryValueType.TemplateRef;
|
||||
}
|
||||
if (valueType != null) {
|
||||
queryMatchExprs.push(o.literalArr([o.literal(match.queryId), o.literal(valueType)]));
|
||||
|
@ -401,9 +399,9 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
|||
ast.references.forEach((ref) => {
|
||||
let valueType: number;
|
||||
if (!ref.value) {
|
||||
valueType = viewEngine.QueryValueType.RenderElement;
|
||||
valueType = QueryValueType.RenderElement;
|
||||
} else if (tokenReference(ref.value) === resolveIdentifier(Identifiers.TemplateRef)) {
|
||||
valueType = viewEngine.QueryValueType.TemplateRef;
|
||||
valueType = QueryValueType.TemplateRef;
|
||||
}
|
||||
if (valueType != null) {
|
||||
this.refNodeIndices[ref.name] = nodeIndex;
|
||||
|
@ -434,15 +432,15 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
|||
this.nodeDefs.push(null);
|
||||
|
||||
directiveAst.directive.queries.forEach((query, queryIndex) => {
|
||||
let flags = viewEngine.NodeFlags.HasContentQuery;
|
||||
let flags = NodeFlags.HasContentQuery;
|
||||
const queryId = directiveAst.contentQueryStartId + queryIndex;
|
||||
if (queryIds.staticQueryIds.has(queryId)) {
|
||||
flags |= viewEngine.NodeFlags.HasStaticQuery;
|
||||
flags |= NodeFlags.HasStaticQuery;
|
||||
} else {
|
||||
flags |= viewEngine.NodeFlags.HasDynamicQuery;
|
||||
flags |= NodeFlags.HasDynamicQuery;
|
||||
}
|
||||
const bindingType =
|
||||
query.first ? viewEngine.QueryBindingType.First : viewEngine.QueryBindingType.All;
|
||||
query.first ? QueryBindingType.First : QueryBindingType.All;
|
||||
this.nodeDefs.push(() => o.importExpr(createIdentifier(Identifiers.queryDef)).callFn([
|
||||
o.literal(flags), o.literal(queryId),
|
||||
new o.LiteralMapExpr([new o.LiteralMapEntry(query.propertyName, o.literal(bindingType))])
|
||||
|
@ -462,7 +460,7 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
|||
if (ref.value && tokenReference(ref.value) === tokenReference(providerAst.token)) {
|
||||
this.refNodeIndices[ref.name] = nodeIndex;
|
||||
queryMatchExprs.push(
|
||||
o.literalArr([o.literal(ref.name), o.literal(viewEngine.QueryValueType.Provider)]));
|
||||
o.literalArr([o.literal(ref.name), o.literal(QueryValueType.Provider)]));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -489,7 +487,7 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
|||
}
|
||||
});
|
||||
if (directiveAst.inputs.length ||
|
||||
(flags & (viewEngine.NodeFlags.DoCheck | viewEngine.NodeFlags.OnInit)) > 0) {
|
||||
(flags & (NodeFlags.DoCheck | NodeFlags.OnInit)) > 0) {
|
||||
this._addUpdateExpressions(
|
||||
nodeIndex,
|
||||
directiveAst.inputs.map((input) => { return {context: COMP_VAR, value: input.value}; }),
|
||||
|
@ -551,12 +549,12 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
|||
providerType: number,
|
||||
depsExpr: o.Expression
|
||||
} {
|
||||
let flags = viewEngine.NodeFlags.None;
|
||||
let flags = NodeFlags.None;
|
||||
if (!providerAst.eager) {
|
||||
flags |= viewEngine.NodeFlags.LazyProvider;
|
||||
flags |= NodeFlags.LazyProvider;
|
||||
}
|
||||
if (providerAst.providerType === ProviderAstType.PrivateService) {
|
||||
flags |= viewEngine.NodeFlags.PrivateProvider;
|
||||
flags |= NodeFlags.PrivateProvider;
|
||||
}
|
||||
providerAst.lifecycleHooks.forEach((lifecycleHook) => {
|
||||
// for regular providers, we only support ngOnDestroy
|
||||
|
@ -570,8 +568,8 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
|||
|
||||
queryMatches.forEach((match) => {
|
||||
if (tokenReference(match.value) === tokenReference(providerAst.token)) {
|
||||
queryMatchExprs.push(o.literalArr(
|
||||
[o.literal(match.queryId), o.literal(viewEngine.QueryValueType.Provider)]));
|
||||
queryMatchExprs.push(
|
||||
o.literalArr([o.literal(match.queryId), o.literal(QueryValueType.Provider)]));
|
||||
}
|
||||
});
|
||||
const {providerExpr, providerType, depsExpr} = providerDef(providerAst);
|
||||
|
@ -672,7 +670,7 @@ class ViewBuilder implements TemplateAstVisitor, LocalResolver, BuiltinConverter
|
|||
|
||||
private _createPipe(pipe: CompilePipeSummary): number {
|
||||
const nodeIndex = this.nodeDefs.length;
|
||||
let flags = viewEngine.NodeFlags.None;
|
||||
let flags = NodeFlags.None;
|
||||
pipe.type.lifecycleHooks.forEach((lifecycleHook) => {
|
||||
// for pipes, we only support ngOnDestroy
|
||||
if (lifecycleHook === LifecycleHooks.OnDestroy) {
|
||||
|
@ -782,7 +780,7 @@ function multiProviderDef(providers: CompileProviderMetadata[]):
|
|||
o.fn(allParams, [new o.ReturnStatement(o.literalArr(exprs))], o.INFERRED_TYPE);
|
||||
return {
|
||||
providerExpr,
|
||||
providerType: viewEngine.ProviderType.Factory,
|
||||
providerType: ProviderType.Factory,
|
||||
depsExpr: o.literalArr(allDepDefs)
|
||||
};
|
||||
|
||||
|
@ -803,19 +801,19 @@ function singleProviderDef(providerMeta: CompileProviderMetadata):
|
|||
let deps: CompileDiDependencyMetadata[];
|
||||
if (providerMeta.useClass) {
|
||||
providerExpr = o.importExpr(providerMeta.useClass);
|
||||
providerType = viewEngine.ProviderType.Class;
|
||||
providerType = ProviderType.Class;
|
||||
deps = providerMeta.deps || providerMeta.useClass.diDeps;
|
||||
} else if (providerMeta.useFactory) {
|
||||
providerExpr = o.importExpr(providerMeta.useFactory);
|
||||
providerType = viewEngine.ProviderType.Factory;
|
||||
providerType = ProviderType.Factory;
|
||||
deps = providerMeta.deps || providerMeta.useFactory.diDeps;
|
||||
} else if (providerMeta.useExisting) {
|
||||
providerExpr = o.NULL_EXPR;
|
||||
providerType = viewEngine.ProviderType.UseExisting;
|
||||
providerType = ProviderType.UseExisting;
|
||||
deps = [{token: providerMeta.useExisting}];
|
||||
} else {
|
||||
providerExpr = convertValueToOutputAst(providerMeta.useValue);
|
||||
providerType = viewEngine.ProviderType.Value;
|
||||
providerType = ProviderType.Value;
|
||||
deps = [];
|
||||
}
|
||||
const depsExpr = o.literalArr(deps.map(dep => depDef(dep)));
|
||||
|
@ -830,17 +828,17 @@ function depDef(dep: CompileDiDependencyMetadata): o.Expression {
|
|||
// Note: the following fields have already been normalized out by provider_analyzer:
|
||||
// - isAttribute, isSelf, isHost
|
||||
const expr = dep.isValue ? convertValueToOutputAst(dep.value) : tokenExpr(dep.token);
|
||||
let flags = viewEngine.DepFlags.None;
|
||||
let flags = DepFlags.None;
|
||||
if (dep.isSkipSelf) {
|
||||
flags |= viewEngine.DepFlags.SkipSelf;
|
||||
flags |= DepFlags.SkipSelf;
|
||||
}
|
||||
if (dep.isOptional) {
|
||||
flags |= viewEngine.DepFlags.Optional;
|
||||
flags |= DepFlags.Optional;
|
||||
}
|
||||
if (dep.isValue) {
|
||||
flags |= viewEngine.DepFlags.Value;
|
||||
flags |= DepFlags.Value;
|
||||
}
|
||||
return flags === viewEngine.DepFlags.None ? expr : o.literalArr([o.literal(flags), expr]);
|
||||
return flags === DepFlags.None ? expr : o.literalArr([o.literal(flags), expr]);
|
||||
}
|
||||
|
||||
function needsAdditionalRootNode(ast: TemplateAst): boolean {
|
||||
|
@ -859,31 +857,31 @@ function needsAdditionalRootNode(ast: TemplateAst): boolean {
|
|||
}
|
||||
|
||||
function lifecycleHookToNodeFlag(lifecycleHook: LifecycleHooks): number {
|
||||
let nodeFlag = viewEngine.NodeFlags.None;
|
||||
let nodeFlag = NodeFlags.None;
|
||||
switch (lifecycleHook) {
|
||||
case LifecycleHooks.AfterContentChecked:
|
||||
nodeFlag = viewEngine.NodeFlags.AfterContentChecked;
|
||||
nodeFlag = NodeFlags.AfterContentChecked;
|
||||
break;
|
||||
case LifecycleHooks.AfterContentInit:
|
||||
nodeFlag = viewEngine.NodeFlags.AfterContentInit;
|
||||
nodeFlag = NodeFlags.AfterContentInit;
|
||||
break;
|
||||
case LifecycleHooks.AfterViewChecked:
|
||||
nodeFlag = viewEngine.NodeFlags.AfterViewChecked;
|
||||
nodeFlag = NodeFlags.AfterViewChecked;
|
||||
break;
|
||||
case LifecycleHooks.AfterViewInit:
|
||||
nodeFlag = viewEngine.NodeFlags.AfterViewInit;
|
||||
nodeFlag = NodeFlags.AfterViewInit;
|
||||
break;
|
||||
case LifecycleHooks.DoCheck:
|
||||
nodeFlag = viewEngine.NodeFlags.DoCheck;
|
||||
nodeFlag = NodeFlags.DoCheck;
|
||||
break;
|
||||
case LifecycleHooks.OnChanges:
|
||||
nodeFlag = viewEngine.NodeFlags.OnChanges;
|
||||
nodeFlag = NodeFlags.OnChanges;
|
||||
break;
|
||||
case LifecycleHooks.OnDestroy:
|
||||
nodeFlag = viewEngine.NodeFlags.OnDestroy;
|
||||
nodeFlag = NodeFlags.OnDestroy;
|
||||
break;
|
||||
case LifecycleHooks.OnInit:
|
||||
nodeFlag = viewEngine.NodeFlags.OnInit;
|
||||
nodeFlag = NodeFlags.OnInit;
|
||||
break;
|
||||
}
|
||||
return nodeFlag;
|
||||
|
@ -894,12 +892,12 @@ function elementBindingDefs(inputAsts: BoundElementPropertyAst[]): o.Expression[
|
|||
switch (inputAst.type) {
|
||||
case PropertyBindingType.Attribute:
|
||||
return o.literalArr([
|
||||
o.literal(viewEngine.BindingType.ElementAttribute), o.literal(inputAst.name),
|
||||
o.literal(BindingType.ElementAttribute), o.literal(inputAst.name),
|
||||
o.literal(inputAst.securityContext)
|
||||
]);
|
||||
case PropertyBindingType.Property:
|
||||
return o.literalArr([
|
||||
o.literal(viewEngine.BindingType.ElementProperty), o.literal(inputAst.name),
|
||||
o.literal(BindingType.ElementProperty), o.literal(inputAst.name),
|
||||
o.literal(inputAst.securityContext)
|
||||
]);
|
||||
case PropertyBindingType.Animation:
|
||||
|
@ -908,12 +906,10 @@ function elementBindingDefs(inputAsts: BoundElementPropertyAst[]): o.Expression[
|
|||
o.literal(inputAst.securityContext)
|
||||
]);
|
||||
case PropertyBindingType.Class:
|
||||
return o.literalArr(
|
||||
[o.literal(viewEngine.BindingType.ElementClass), o.literal(inputAst.name)]);
|
||||
return o.literalArr([o.literal(BindingType.ElementClass), o.literal(inputAst.name)]);
|
||||
case PropertyBindingType.Style:
|
||||
return o.literalArr([
|
||||
o.literal(viewEngine.BindingType.ElementStyle), o.literal(inputAst.name),
|
||||
o.literal(inputAst.unit)
|
||||
o.literal(BindingType.ElementStyle), o.literal(inputAst.name), o.literal(inputAst.unit)
|
||||
]);
|
||||
}
|
||||
});
|
||||
|
@ -947,13 +943,11 @@ function mergeAttributeValue(attrName: string, attrValue1: string, attrValue2: s
|
|||
|
||||
function callCheckStmt(nodeIndex: number, exprs: o.Expression[]): o.Expression {
|
||||
if (exprs.length > 10) {
|
||||
return CHECK_VAR.callFn([
|
||||
VIEW_VAR, o.literal(nodeIndex), o.literal(viewEngine.ArgumentType.Dynamic),
|
||||
o.literalArr(exprs)
|
||||
]);
|
||||
return CHECK_VAR.callFn(
|
||||
[VIEW_VAR, o.literal(nodeIndex), o.literal(ArgumentType.Dynamic), o.literalArr(exprs)]);
|
||||
} else {
|
||||
return CHECK_VAR.callFn(
|
||||
[VIEW_VAR, o.literal(nodeIndex), o.literal(viewEngine.ArgumentType.Inline), ...exprs]);
|
||||
[VIEW_VAR, o.literal(nodeIndex), o.literal(ArgumentType.Inline), ...exprs]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es5",
|
||||
"target": "es2015",
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2015", "dom"],
|
||||
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
{
|
||||
"extends": "./tsconfig-build",
|
||||
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../dist/packages-dist/compiler/es5",
|
||||
"target": "es5"
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@
|
|||
"compilerOptions": {
|
||||
// Test that we rely on decorator downleveling
|
||||
"emitDecoratorMetadata": false,
|
||||
"outDir": "../../../dist/packages-dist/compiler",
|
||||
"paths": {
|
||||
"@angular/core": ["../../../dist/packages-dist/core"],
|
||||
"@angular/core/testing": ["../../../dist/packages-dist/core/testing"],
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/core": "ng.core",
|
||||
"rxjs/Subject": "Rx"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/core"
|
||||
}
|
||||
|
|
@ -2,9 +2,10 @@
|
|||
"name": "@angular/core",
|
||||
"version": "0.0.0-PLACEHOLDER",
|
||||
"description": "Angular - the core framework",
|
||||
"main": "bundles/core.umd.js",
|
||||
"module": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"main": "./bundles/core.umd.js",
|
||||
"module": "./@angular/core.es5.js",
|
||||
"es2015": "./@angular/core.js",
|
||||
"typings": "./typings/core.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/core/testing/index.js',
|
||||
dest: '../../../dist/packages-dist/core/bundles/core-testing.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.core.testing',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/Subject': 'Rx',
|
||||
}
|
||||
};
|
|
@ -1,18 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/core/index.js',
|
||||
dest: '../../../dist/packages-dist/core/bundles/core.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.core',
|
||||
globals: {
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/Subject': 'Rx',
|
||||
}
|
||||
};
|
|
@ -6,9 +6,6 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import * as view_utils from './linker/view_utils';
|
||||
import * as viewEngine from './view/index';
|
||||
|
||||
export {AnimationGroupPlayer as ɵAnimationGroupPlayer} from './animation/animation_group_player';
|
||||
export {AnimationKeyframe as ɵAnimationKeyframe} from './animation/animation_keyframe';
|
||||
export {NoOpAnimationPlayer as ɵNoOpAnimationPlayer} from './animation/animation_player';
|
||||
|
@ -28,5 +25,5 @@ export {AppView as ɵAppView, DebugAppView as ɵDebugAppView} from './linker/vie
|
|||
export {ViewContainer as ɵViewContainer} from './linker/view_container';
|
||||
export {ViewType as ɵViewType} from './linker/view_type';
|
||||
export {reflector as ɵreflector} from './reflection/reflection';
|
||||
export {view_utils as ɵview_utils};
|
||||
export {viewEngine as ɵviewEngine};
|
||||
export {ViewUtils as ɵViewUtils, checkBinding as ɵcheckBinding, checkBindingChange as ɵcheckBindingChange, checkRenderText as ɵcheckRenderText, checkRenderProperty as ɵcheckRenderProperty, checkRenderAttribute as ɵcheckRenderAttribute, checkRenderClass as ɵcheckRenderClass, checkRenderStyle as ɵcheckRenderStyle, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, castByValue as ɵcastByValue, EMPTY_ARRAY as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, createRenderElement as ɵcreateRenderElement, selectOrCreateRenderHostElement as ɵselectOrCreateRenderHostElement, pureProxy1 as ɵpureProxy1, pureProxy2 as ɵpureProxy2, pureProxy3 as ɵpureProxy3, pureProxy4 as ɵpureProxy4, pureProxy5 as ɵpureProxy5, pureProxy6 as ɵpureProxy6, pureProxy7 as ɵpureProxy7, pureProxy8 as ɵpureProxy8, pureProxy9 as ɵpureProxy9, pureProxy10 as ɵpureProxy10, noop as ɵnoop, setBindingDebugInfo as ɵsetBindingDebugInfo, setBindingDebugInfoForChanges as ɵsetBindingDebugInfoForChanges, InlineArray2 as ɵInlineArray2, InlineArray4 as ɵInlineArray4, InlineArray8 as ɵInlineArray8, InlineArray16 as ɵInlineArray16, EMPTY_INLINE_ARRAY as ɵEMPTY_INLINE_ARRAY, InlineArrayDynamic as ɵInlineArrayDynamic, subscribeToRenderElement as ɵsubscribeToRenderElement, createRenderComponentType as ɵcreateRenderComponentType, getComponentFactoryViewClass as ɵgetComponentFactoryViewClass} from './linker/view_utils';
|
||||
export {viewDef as ɵviewDef, elementDef as ɵelementDef, anchorDef as ɵanchorDef, textDef as ɵtextDef, directiveDef as ɵdirectiveDef, providerDef as ɵproviderDef, queryDef as ɵqueryDef, pureArrayDef as ɵpureArrayDef, pureObjectDef as ɵpureObjectDef, purePipeDef as ɵpurePipeDef, pipeDef as ɵpipeDef, nodeValue as ɵnodeValue, ngContentDef as ɵngContentDef, unwrapValue as ɵunwrapValue, NodeFlags as ɵNodeFlags, ViewFlags as ɵViewFlags, elementEventFullName as ɵelementEventFullName, QueryValueType as ɵQueryValueType, QueryBindingType as ɵQueryBindingType, ProviderType as ɵProviderType, BindingType as ɵBindingType, ArgumentType as ɵArgumentType, DepFlags as ɵDepFlags, createComponentFactory as ɵcreateComponentFactory, createRendererTypeV2 as ɵcreateRendererTypeV2} from './view/index';
|
||||
|
|
|
@ -16,6 +16,6 @@ export * from './async';
|
|||
export * from './component_fixture';
|
||||
export * from './fake_async';
|
||||
export * from './test_bed';
|
||||
export * from './testing';
|
||||
export * from './before_each';
|
||||
export * from './metadata_override';
|
||||
export * from './private_export_testing';
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es5",
|
||||
"target": "es2015",
|
||||
"lib": ["es2015", "dom"],
|
||||
"skipLibCheck": true,
|
||||
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"extends": "./tsconfig-build",
|
||||
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../dist/packages-dist/core",
|
||||
"paths": {
|
||||
"rxjs/*": ["../../../node_modules/rxjs/*"],
|
||||
"@angular/core": ["../../../dist/packages-dist/core"]
|
||||
|
|
|
@ -214,7 +214,7 @@ You can obtain the MessageBus on both the render and worker thread through DI.
|
|||
To use the MessageBus you need to initialize a new channel on both the UI and WebWorker.
|
||||
In TypeScript that would look like this:
|
||||
```TypeScript
|
||||
// index.ts, which is running on the UI.
|
||||
// public_api.ts, which is running on the UI.
|
||||
import {WORKER_RENDER_PLATFORM, WORKER_RENDER_APPLICATION, WORKER_SCRIPT, MessageBus} from "angular2/platform/worker_render";
|
||||
import {platform} from "angular2/core";
|
||||
|
||||
|
@ -238,7 +238,7 @@ export class MyComponent {
|
|||
Once the channel has been initialized either side can use the `from` and `to` methods on the MessageBus to send
|
||||
and receive messages. Both methods return EventEmitter. Expanding on the example from earlier:
|
||||
```TypeScript
|
||||
// index.ts, which is running on the UI.
|
||||
// public_api.ts, which is running on the UI.
|
||||
import {WORKER_RENDER_PLATFORM, WORKER_RENDER_APPLICATION, WORKER_SCRIPT, MessageBus} from "angular2/platform/worker_render";
|
||||
import {platform} from "angular2/core";
|
||||
|
||||
|
@ -334,7 +334,7 @@ during bootstrap like so:
|
|||
|
||||
In TypeScript:
|
||||
```TypeScript
|
||||
// index.ts, running on the UI side
|
||||
// public_api.ts, running on the UI side
|
||||
import {platform, APP_INITIALIZER, Injector} from 'angular2/core';
|
||||
import {
|
||||
WORKER_RENDER_PLATFORM,
|
||||
|
@ -401,7 +401,7 @@ MessageBrokers in an application. For a more complete example, check out the `We
|
|||
|
||||
#### Using the MessageBroker in TypeScript
|
||||
```TypeScript
|
||||
// index.ts, which is running on the UI with a method that we want to expose to a WebWorker
|
||||
// public_api.ts, which is running on the UI with a method that we want to expose to a WebWorker
|
||||
import {WORKER_RENDER_PLATFORM, WORKER_RENDER_APPLICATION, WORKER_SCRIPT, ServiceMessageBrokerFactory} from "angular2/platform/worker_render";
|
||||
import {platform} from "angular2/core";
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
|
||||
import * as module from './module';
|
||||
import * as mod from './module';
|
||||
|
||||
if (module.AppModule) {
|
||||
platformBrowserDynamic().bootstrapModule(module.AppModule);
|
||||
if (mod.AppModule) {
|
||||
platformBrowserDynamic().bootstrapModule(mod.AppModule);
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/core": "ng.core",
|
||||
"@angular/common": "ng.common",
|
||||
"@angular/compiler": "ng.compiler",
|
||||
"@angular/forms": "ng.forms",
|
||||
"rxjs/Observable": "Rx",
|
||||
"rxjs/Subject": "Rx",
|
||||
"rxjs/observable/fromPromise": "Rx.Observable",
|
||||
"rxjs/operator/toPromise": "Rx.Observable.prototype"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/forms"
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
// This file is not used to build this module. It is only used during editing
|
||||
// by the TypeScript language serivce and during build for verifcation. `ngc`
|
||||
// by the TypeScript language service and during build for verification. `ngc`
|
||||
// replaces this file with production index.ts when it rewrites private symbol
|
||||
// names.
|
||||
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
"name": "@angular/forms",
|
||||
"version": "0.0.0-PLACEHOLDER",
|
||||
"description": "Angular - directives and services for creating forms",
|
||||
"main": "bundles/forms.umd.js",
|
||||
"module": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"main": "./bundles/forms.umd.js",
|
||||
"module": "./@angular/forms.es5.js",
|
||||
"es2015": "./@angular/forms.js",
|
||||
"typings": "./typings/forms.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/forms/index.js',
|
||||
dest: '../../../dist/packages-dist/forms/bundles/forms.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.forms',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/common': 'ng.common',
|
||||
'@angular/compiler': 'ng.compiler',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/Subject': 'Rx',
|
||||
'rxjs/observable/fromPromise': 'Rx.Observable',
|
||||
'rxjs/operator/toPromise': 'Rx.Observable.prototype'
|
||||
}
|
||||
};
|
|
@ -18,7 +18,7 @@
|
|||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es5",
|
||||
"target": "es2015",
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2015", "dom"],
|
||||
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/core": "ng.core",
|
||||
"@angular/compiler": "ng.compiler",
|
||||
"@angular/platform-browser": "ng.platformBrowser",
|
||||
"@angular/http": "ng.http",
|
||||
"rxjs/Observable": "Rx",
|
||||
"rxjs/Subject": "Rx"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/http"
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/core": "ng.core",
|
||||
"@angular/compiler": "ng.compiler",
|
||||
"@angular/platform-browser": "ng.platformBrowser",
|
||||
"@angular/http": "ng.http",
|
||||
"@angular/http/testing": "ng.http.testing",
|
||||
"rxjs/Observable": "Rx",
|
||||
"rxjs/ReplaySubject": "Rx",
|
||||
"rxjs/Subject": "Rx",
|
||||
"rxjs/operator/take": "Rx.Observable.prototype"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/http/testing"
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
// This file is not used to build this module. It is only used during editing
|
||||
// by the TypeScript language serivce and during build for verifcation. `ngc`
|
||||
// by the TypeScript language service and during build for verification. `ngc`
|
||||
// replaces this file with production index.ts when it rewrites private symbol
|
||||
// names.
|
||||
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
"name": "@angular/http",
|
||||
"version": "0.0.0-PLACEHOLDER",
|
||||
"description": "Angular - the http service",
|
||||
"main": "bundles/http.umd.js",
|
||||
"module": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"main": "./bundles/http.umd.js",
|
||||
"module": "./@angular/http.es5.js",
|
||||
"es2015": "./@angular/http.js",
|
||||
"typings": "./typings/http.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/http/testing/index.js',
|
||||
dest: '../../../dist/packages-dist/http/bundles/http-testing.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.http.testing',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/compiler': 'ng.compiler',
|
||||
'@angular/platform-browser': 'ng.platformBrowser',
|
||||
'@angular/http': 'ng.http',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/ReplaySubject': 'Rx',
|
||||
'rxjs/Subject': 'Rx',
|
||||
'rxjs/operator/take': 'Rx.Observable.prototype'
|
||||
}
|
||||
};
|
|
@ -1,21 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/http/index.js',
|
||||
dest: '../../../dist/packages-dist/http/bundles/http.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.http',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/compiler': 'ng.compiler',
|
||||
'@angular/platform-browser': 'ng.platformBrowser',
|
||||
'rxjs/Observable': 'Rx',
|
||||
'rxjs/Subject': 'Rx'
|
||||
}
|
||||
};
|
|
@ -15,7 +15,7 @@
|
|||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es5",
|
||||
"target": "es2015",
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2015", "dom"]
|
||||
},
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"extends": "./tsconfig-build",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../dist/packages-dist/http",
|
||||
"paths": {
|
||||
"@angular/core": ["../../../dist/packages-dist/core"],
|
||||
"@angular/http": ["../../../dist/packages-dist/http"],
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/language-service": "ng.language_service",
|
||||
"typescript": "ts",
|
||||
"path": "path",
|
||||
"fs": "fs"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/language-service"
|
||||
}
|
|
@ -2,9 +2,10 @@
|
|||
"name": "@angular/language-service",
|
||||
"version": "0.0.0-PLACEHOLDER",
|
||||
"description": "Angular - language services",
|
||||
"main": "bundles/language-service.umd.js",
|
||||
"module": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"main": "./bundles/language-service.umd.js",
|
||||
"module": "./@angular/language-service.es5.js",
|
||||
"es2015": "./@angular/language-service.js",
|
||||
"typings": "./typings/language-service.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
import commonjs from 'rollup-plugin-commonjs';
|
||||
import * as path from 'path';
|
||||
|
||||
var m = /^\@angular\/((\w|\-)+)(\/(\w|\d|\/|\-)+)?$/;
|
||||
var location = normalize('../../../dist/packages-dist') + '/';
|
||||
var rxjsLocation = normalize('../../../node_modules/rxjs');
|
||||
var esm = 'esm/';
|
||||
|
||||
var locations = {
|
||||
'tsc-wrapped': normalize('../../../dist/tools/@angular') + '/',
|
||||
'compiler-cli': normalize('../../../dist/esm') + '/'
|
||||
};
|
||||
|
||||
var esm_suffixes = {};
|
||||
|
||||
function normalize(fileName) {
|
||||
return path.resolve(__dirname, fileName);
|
||||
}
|
||||
|
||||
function resolve(id, from) {
|
||||
// console.log('Resolve id:', id, 'from', from)
|
||||
if (id == '@angular/tsc-wrapped') {
|
||||
// Hack to restrict the import to not include the index of @angular/tsc-wrapped so we don't
|
||||
// rollup tsickle.
|
||||
return locations['tsc-wrapped'] + 'tsc-wrapped/src/collector.js';
|
||||
}
|
||||
var match = m.exec(id);
|
||||
if (match) {
|
||||
var packageName = match[1];
|
||||
var esm_suffix = esm_suffixes[packageName] || '';
|
||||
var loc = locations[packageName] || location;
|
||||
var r = loc + esm_suffix + packageName + (match[3] || '/index') + '.js';
|
||||
// console.log('** ANGULAR MAPPED **: ', r);
|
||||
return r;
|
||||
}
|
||||
if (id && id.startsWith('rxjs/')) {
|
||||
const resolved = `${rxjsLocation}${id.replace('rxjs', '')}.js`;
|
||||
return resolved;
|
||||
}
|
||||
}
|
||||
|
||||
var banner = `
|
||||
var $deferred, $resolved, $provided;
|
||||
function $getModule(name) { return $provided[name] || require(name); }
|
||||
function define(modules, cb) { $deferred = { modules: modules, cb: cb }; }
|
||||
module.exports = function(provided) {
|
||||
if ($resolved) return $resolved;
|
||||
var result = {};
|
||||
$provided = Object.assign({}, provided || {}, { exports: result });
|
||||
$deferred.cb.apply(this, $deferred.modules.map($getModule));
|
||||
$resolved = result;
|
||||
return result;
|
||||
}
|
||||
`;
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/language-service/index.js',
|
||||
dest: '../../../dist/packages-dist/language-service/bundles/language-service.umd.js',
|
||||
format: 'amd',
|
||||
moduleName: 'ng.language_service',
|
||||
exports: 'named',
|
||||
external: [
|
||||
'fs',
|
||||
'path',
|
||||
'typescript',
|
||||
],
|
||||
globals: {
|
||||
'typescript': 'ts',
|
||||
'path': 'path',
|
||||
'fs': 'fs',
|
||||
},
|
||||
banner: banner,
|
||||
plugins: [{resolveId: resolve}, commonjs()]
|
||||
}
|
|
@ -6,13 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {CompileDirectiveMetadata, CompileDirectiveSummary, CompilePipeSummary} from '@angular/compiler';
|
||||
|
||||
import {Parser} from '@angular/compiler/src/expression_parser/parser';
|
||||
import {Node as HtmlAst} from '@angular/compiler/src/ml_parser/ast';
|
||||
import {ParseError} from '@angular/compiler/src/parse_util';
|
||||
import {CssSelector} from '@angular/compiler/src/selector';
|
||||
import {TemplateAst} from '@angular/compiler/src/template_parser/template_ast';
|
||||
import {CompileDirectiveMetadata, CompileDirectiveSummary, CompilePipeSummary, CssSelector, Node as HtmlAst, ParseError, Parser, TemplateAst} from '@angular/compiler';
|
||||
|
||||
import {Diagnostic, TemplateSource} from './types';
|
||||
|
||||
|
|
|
@ -6,12 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {AST, ImplicitReceiver, ParseSpan, PropertyRead} from '@angular/compiler/src/expression_parser/ast';
|
||||
import {Attribute, Element, Node as HtmlAst, Text} from '@angular/compiler/src/ml_parser/ast';
|
||||
import {getHtmlTagDefinition} from '@angular/compiler/src/ml_parser/html_tags';
|
||||
import {NAMED_ENTITIES, TagContentType, splitNsName} from '@angular/compiler/src/ml_parser/tags';
|
||||
import {CssSelector, SelectorMatcher} from '@angular/compiler/src/selector';
|
||||
import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '@angular/compiler/src/template_parser/template_ast';
|
||||
import {AST, AttrAst, Attribute, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, CssSelector, DirectiveAst, Element, ElementAst, EmbeddedTemplateAst, ImplicitReceiver, NAMED_ENTITIES, NgContentAst, Node as HtmlAst, ParseSpan, PropertyRead, ReferenceAst, SelectorMatcher, TagContentType, TemplateAst, TemplateAstVisitor, Text, TextAst, VariableAst, getHtmlTagDefinition, splitNsName, templateVisitAll} from '@angular/compiler';
|
||||
|
||||
import {AstResult, AttrInfo, SelectorInfo, TemplateInfo} from './common';
|
||||
import {getExpressionCompletions, getExpressionScope} from './expressions';
|
||||
|
|
|
@ -6,11 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {CompileDirectiveMetadata, CompileDirectiveSummary, StaticSymbol} from '@angular/compiler';
|
||||
import {NgAnalyzedModules} from '@angular/compiler/src/aot/compiler';
|
||||
import {AST} from '@angular/compiler/src/expression_parser/ast';
|
||||
import {Attribute} from '@angular/compiler/src/ml_parser/ast';
|
||||
import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '@angular/compiler/src/template_parser/template_ast';
|
||||
import {AST, AttrAst, Attribute, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, CompileDirectiveMetadata, CompileDirectiveSummary, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgAnalyzedModules, NgContentAst, ReferenceAst, StaticSymbol, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '@angular/compiler';
|
||||
|
||||
import {AstResult, SelectorInfo, TemplateInfo} from './common';
|
||||
import {getExpressionDiagnostics, getExpressionScope} from './expressions';
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {StaticSymbol, identifierName, tokenReference} from '@angular/compiler';
|
||||
import {AST, ASTWithSource, AstVisitor, Binary, BindingPipe, Chain, Conditional, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralPrimitive, MethodCall, PrefixNot, PropertyRead, PropertyWrite, Quote, SafeMethodCall, SafePropertyRead} from '@angular/compiler/src/expression_parser/ast';
|
||||
import {ElementAst, EmbeddedTemplateAst, ReferenceAst, TemplateAst, templateVisitAll} from '@angular/compiler/src/template_parser/template_ast';
|
||||
import {AST, ASTWithSource, AstVisitor, Binary, BindingPipe, Chain, Conditional, ElementAst, EmbeddedTemplateAst, FunctionCall, ImplicitReceiver, Interpolation, KeyedRead, KeyedWrite, LiteralArray, LiteralMap, LiteralPrimitive, MethodCall, PrefixNot, PropertyRead, PropertyWrite, Quote, ReferenceAst, SafeMethodCall, SafePropertyRead, StaticSymbol, TemplateAst, identifierName, templateVisitAll, tokenReference} from '@angular/compiler';
|
||||
|
||||
import {AstPath as AstPathBase} from './ast_path';
|
||||
import {TemplateInfo} from './common';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Attribute, Comment, Element, Expansion, ExpansionCase, Node, Text, Visitor, visitAll} from '@angular/compiler/src/ml_parser/ast';
|
||||
import {Attribute, Comment, Element, Expansion, ExpansionCase, Node, Text, Visitor, visitAll} from '@angular/compiler';
|
||||
|
||||
import {AstPath} from './ast_path';
|
||||
import {inSpan, spanOf} from './utils';
|
||||
|
|
|
@ -6,16 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {NgAnalyzedModules} from '@angular/compiler/src/aot/compiler';
|
||||
import {CompileNgModuleMetadata} from '@angular/compiler/src/compile_metadata';
|
||||
import {CompilerConfig} from '@angular/compiler/src/config';
|
||||
import {Lexer} from '@angular/compiler/src/expression_parser/lexer';
|
||||
import {Parser} from '@angular/compiler/src/expression_parser/parser';
|
||||
import {I18NHtmlParser} from '@angular/compiler/src/i18n/i18n_html_parser';
|
||||
import {CompileMetadataResolver} from '@angular/compiler/src/metadata_resolver';
|
||||
import {HtmlParser} from '@angular/compiler/src/ml_parser/html_parser';
|
||||
import {DomElementSchemaRegistry} from '@angular/compiler/src/schema/dom_element_schema_registry';
|
||||
import {TemplateParser} from '@angular/compiler/src/template_parser/template_parser';
|
||||
import {CompileMetadataResolver, CompileNgModuleMetadata, CompilerConfig, DomElementSchemaRegistry, HtmlParser, I18NHtmlParser, Lexer, NgAnalyzedModules, Parser, TemplateParser} from '@angular/compiler';
|
||||
|
||||
import {AstResult, AttrInfo, TemplateInfo} from './common';
|
||||
import {getTemplateCompletions} from './completions';
|
||||
|
|
|
@ -6,10 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {tokenReference} from '@angular/compiler';
|
||||
import {AST} from '@angular/compiler/src/expression_parser/ast';
|
||||
import {Attribute} from '@angular/compiler/src/ml_parser/ast';
|
||||
import {BoundDirectivePropertyAst, BoundEventAst, ElementAst, TemplateAst} from '@angular/compiler/src/template_parser/template_ast';
|
||||
import {AST, Attribute, BoundDirectivePropertyAst, BoundEventAst, ElementAst, TemplateAst, tokenReference} from '@angular/compiler';
|
||||
|
||||
import {TemplateInfo} from './common';
|
||||
import {getExpressionScope, getExpressionSymbol} from './expressions';
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '@angular/compiler/src/template_parser/template_ast';
|
||||
import {AttrAst, BoundDirectivePropertyAst, BoundElementPropertyAst, BoundEventAst, BoundTextAst, DirectiveAst, ElementAst, EmbeddedTemplateAst, NgContentAst, ReferenceAst, TemplateAst, TemplateAstVisitor, TextAst, VariableAst, templateVisitAll} from '@angular/compiler';
|
||||
|
||||
import {AstPath} from './ast_path';
|
||||
import {inSpan, isNarrower, spanOf} from './utils';
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {CompileDirectiveMetadata, StaticSymbol} from '@angular/compiler';
|
||||
import {NgAnalyzedModules} from '@angular/compiler/src/aot/compiler';
|
||||
import {CompileMetadataResolver} from '@angular/compiler/src/metadata_resolver';
|
||||
import {CompileDirectiveMetadata, CompileMetadataResolver, NgAnalyzedModules, StaticSymbol} from '@angular/compiler';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -47,7 +46,7 @@ export interface TemplateSource {
|
|||
|
||||
/**
|
||||
* The version of the source. As files are modified the version should change. That is, if the
|
||||
* `LanguageSerivce` requesting
|
||||
* `LanguageService` requesting
|
||||
* template infomration for a source file and that file has changed since the last time the host
|
||||
* was asked for the file then
|
||||
* this version string should be different. No assumptions are made about the format of this
|
||||
|
@ -411,7 +410,7 @@ export interface SymbolQuery {
|
|||
}
|
||||
|
||||
/**
|
||||
* The host for a `LanguageService`. This provides all the `LanguageSerivce` requires to respond to
|
||||
* The host for a `LanguageService`. This provides all the `LanguageService` requires to respond to
|
||||
* the `LanguageService` requests.
|
||||
*
|
||||
* This interface describes the requirements of the `LanguageService` on its host.
|
||||
|
@ -419,7 +418,7 @@ export interface SymbolQuery {
|
|||
* The host interface is host language agnostic.
|
||||
*
|
||||
* Adding optional member to this interface or any interface that is described as a
|
||||
* `LanguageSerivceHost`
|
||||
* `LanguageServiceHost`
|
||||
* interface is not considered a breaking change as defined by SemVer. Removing a method or changing
|
||||
* a
|
||||
* member from required to optional will also not be considered a breaking change.
|
||||
|
@ -678,7 +677,7 @@ export interface Hover {
|
|||
* beginning
|
||||
* of the file reference by `fileName`.
|
||||
*
|
||||
* This interface and all interfaces and types marked as `LanguageSerivce` types, describe a
|
||||
* This interface and all interfaces and types marked as `LanguageService` types, describe a
|
||||
* particlar
|
||||
* implementation of the Angular language service and is not intented to be implemented. Adding
|
||||
* members
|
||||
|
|
|
@ -6,20 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {AotSummaryResolver, CompileDirectiveMetadata, CompilerConfig, StaticReflector, StaticSymbol, StaticSymbolCache, StaticSymbolResolver, componentModuleUrl, createOfflineCompileUrlResolver} from '@angular/compiler';
|
||||
import {NgAnalyzedModules, analyzeNgModules, extractProgramSymbols} from '@angular/compiler/src/aot/compiler';
|
||||
import {DirectiveNormalizer} from '@angular/compiler/src/directive_normalizer';
|
||||
import {DirectiveResolver} from '@angular/compiler/src/directive_resolver';
|
||||
import {CompileMetadataResolver} from '@angular/compiler/src/metadata_resolver';
|
||||
import {HtmlParser} from '@angular/compiler/src/ml_parser/html_parser';
|
||||
import {DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig} from '@angular/compiler/src/ml_parser/interpolation_config';
|
||||
import {ParseTreeResult, Parser} from '@angular/compiler/src/ml_parser/parser';
|
||||
import {NgModuleResolver} from '@angular/compiler/src/ng_module_resolver';
|
||||
import {PipeResolver} from '@angular/compiler/src/pipe_resolver';
|
||||
import {ResourceLoader} from '@angular/compiler/src/resource_loader';
|
||||
import {DomElementSchemaRegistry} from '@angular/compiler/src/schema/dom_element_schema_registry';
|
||||
import {SummaryResolver} from '@angular/compiler/src/summary_resolver';
|
||||
import {UrlResolver} from '@angular/compiler/src/url_resolver';
|
||||
import {AotSummaryResolver, CompileDirectiveMetadata, CompileMetadataResolver, CompilerConfig, DEFAULT_INTERPOLATION_CONFIG, DirectiveNormalizer, DirectiveResolver, DomElementSchemaRegistry, HtmlParser, InterpolationConfig, NgAnalyzedModules, NgModuleResolver, ParseTreeResult, Parser, PipeResolver, ResourceLoader, StaticReflector, StaticSymbol, StaticSymbolCache, StaticSymbolResolver, SummaryResolver, UrlResolver, analyzeNgModules, componentModuleUrl, createOfflineCompileUrlResolver, extractProgramSymbols} from '@angular/compiler';
|
||||
import {Type, ViewEncapsulation} from '@angular/core';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
@ -29,6 +16,7 @@ import {createLanguageService} from './language_service';
|
|||
import {ReflectorHost} from './reflector_host';
|
||||
import {BuiltinType, CompletionKind, Declaration, DeclarationError, Declarations, Definition, LanguageService, LanguageServiceHost, PipeInfo, Pipes, Signature, Span, Symbol, SymbolDeclaration, SymbolQuery, SymbolTable, TemplateSource, TemplateSources} from './types';
|
||||
|
||||
|
||||
// In TypeScript 2.1 these flags moved
|
||||
// These helpers work for both 2.0 and 2.1.
|
||||
const isPrivate = (ts as any).ModifierFlags ?
|
||||
|
@ -76,7 +64,7 @@ export class DummyResourceLoader extends ResourceLoader {
|
|||
}
|
||||
|
||||
/**
|
||||
* An implemntation of a `LanguageSerivceHost` for a TypeScript project.
|
||||
* An implemntation of a `LanguageServiceHost` for a TypeScript project.
|
||||
*
|
||||
* The `TypeScriptServiceHost` implements the Angular `LanguageServiceHost` using
|
||||
* the TypeScript language services.
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {CompileDirectiveSummary, CompileTypeMetadata, identifierName} from '@angular/compiler';
|
||||
import {ParseSourceSpan} from '@angular/compiler/src/parse_util';
|
||||
import {CssSelector, SelectorMatcher} from '@angular/compiler/src/selector';
|
||||
import {CompileDirectiveSummary, CompileTypeMetadata, CssSelector, ParseSourceSpan, SelectorMatcher, identifierName} from '@angular/compiler';
|
||||
|
||||
import {SelectorInfo, TemplateInfo} from './common';
|
||||
import {Span} from './types';
|
||||
|
|
|
@ -12,11 +12,9 @@
|
|||
"@angular/core": ["../../../dist/packages-dist/core"],
|
||||
"@angular/animation": ["../../../dist/packages-dist/animation"],
|
||||
"@angular/core/testing": ["../../../dist/packages-dist/core/testing"],
|
||||
"@angular/core/testing/*": ["../../../dist/packages-dist/core/testing/*"],
|
||||
"@angular/common": ["../../../dist/packages-dist/common"],
|
||||
"@angular/compiler": ["../../../dist/packages-dist/compiler"],
|
||||
"@angular/compiler/*": ["../../../dist/packages-dist/compiler/*"],
|
||||
"@angular/compiler-cli": ["../../../dist/packages-dist/compiler-cli"],
|
||||
"@angular/compiler-cli": ["../../../dist/esm/compiler-cli"],
|
||||
"@angular/http": ["../../../dist/packages-dist/http"],
|
||||
"@angular/platform-server": ["../../../dist/packages-dist/platform-server"],
|
||||
"@angular/platform-browser": ["../../../dist/packages-dist/platform-browser"],
|
||||
|
@ -26,7 +24,7 @@
|
|||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es5",
|
||||
"target": "es2015",
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2015", "dom"]
|
||||
},
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/core": "ng.core",
|
||||
"@angular/common": "ng.common",
|
||||
"@angular/compiler": "ng.compiler",
|
||||
"@angular/platform-browser": "ng.platformBrowser",
|
||||
"@angular/platform-browser-dynamic": "ng.platformBrowserDynamic"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/platform-browser-dynamic"
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/core": "ng.core",
|
||||
"@angular/core/testing": "ng.core.testing",
|
||||
"@angular/common": "ng.common",
|
||||
"@angular/compiler": "ng.compiler",
|
||||
"@angular/compiler/testing": "ng.compiler.testing",
|
||||
"@angular/platform-browser": "ng.platformBrowser",
|
||||
"@angular/platform-browser/testing": "ng.platformBrowser.testing",
|
||||
"@angular/platform-browser-dynamic": "ng.platformBrowserDynamic",
|
||||
"@angular/platform-browser-dynamic/testing": "ng.platformBrowserDynamic.testing"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/platform-browser-dynamic/testing"
|
||||
}
|
|
@ -2,9 +2,10 @@
|
|||
"name": "@angular/platform-browser-dynamic",
|
||||
"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": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"main": "./bundles/platform-browser-dynamic.umd.js",
|
||||
"module": "./@angular/platform-browser-dynamic.es5.js",
|
||||
"es2015": "./@angular/platform-browser-dynamic.js",
|
||||
"typings": "./typings/platform-browser-dynamic.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/platform-browser-dynamic/testing/index.js',
|
||||
dest:
|
||||
'../../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.platformBrowserDynamic.testing',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/core/testing': 'ng.core.testing',
|
||||
'@angular/common': 'ng.common',
|
||||
'@angular/compiler': 'ng.compiler',
|
||||
'@angular/compiler/testing': 'ng.compiler.testing',
|
||||
'@angular/platform-browser': 'ng.platformBrowser',
|
||||
'@angular/platform-browser/testing': 'ng.platformBrowser.testing',
|
||||
'@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic'
|
||||
}
|
||||
};
|
|
@ -1,21 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/platform-browser-dynamic/index.js',
|
||||
dest:
|
||||
'../../../dist/packages-dist/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.platformBrowserDynamic',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/common': 'ng.common',
|
||||
'@angular/compiler': 'ng.compiler',
|
||||
'@angular/platform-browser': 'ng.platformBrowser',
|
||||
}
|
||||
};
|
|
@ -20,7 +20,7 @@
|
|||
"rootDir": ".",
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es5",
|
||||
"target": "es2015",
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2015", "dom"],
|
||||
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"extends": "./tsconfig-build",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../../dist/packages-dist/platform-browser-dynamic",
|
||||
"paths": {
|
||||
"@angular/core": ["../../../dist/packages-dist/core"],
|
||||
"@angular/core/testing": ["../../../dist/packages-dist/core/testing"],
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/core": "ng.core",
|
||||
"@angular/common": "ng.common",
|
||||
"@angular/platform-browser": "ng.platformBrowser"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/platform-browser"
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
{
|
||||
"presets": ["es2015"],
|
||||
"plugins": [["transform-es2015-modules-umd", {
|
||||
"globals": {
|
||||
"@angular/core": "ng.core",
|
||||
"@angular/common": "ng.common",
|
||||
"@angular/platform-browser": "ng.platformBrowser",
|
||||
"@angular/platform-browser/testing": "ng.platformBrowser.testing"
|
||||
},
|
||||
"exactGlobals": true
|
||||
}]],
|
||||
"moduleId": "@angular/platform-browser/testing"
|
||||
}
|
|
@ -6,10 +6,9 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @module
|
||||
* @description
|
||||
* Entry point for all public APIs of the platform-browser package.
|
||||
*/
|
||||
export * from './src/platform-browser';
|
||||
// This file only reexports content of the `src` folder. Keep it that way.
|
||||
// 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';
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
"name": "@angular/platform-browser",
|
||||
"version": "0.0.0-PLACEHOLDER",
|
||||
"description": "Angular - library for using Angular in a web browser",
|
||||
"main": "bundles/platform-browser.umd.js",
|
||||
"module": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"main": "./bundles/platform-browser.umd.js",
|
||||
"module": "./@angular/platform-browser.es5.js",
|
||||
"es2015": "./@angular/platform-browser.js",
|
||||
"typings": "./typings/platform-browser.d.ts",
|
||||
"author": "angular",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* @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 platform-browser package.
|
||||
*/
|
||||
export * from './src/platform-browser';
|
||||
// This file only reexports content of the `src` folder. Keep it that way.
|
|
@ -1,19 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/platform-browser/testing/index.js',
|
||||
dest: '../../../dist/packages-dist/platform-browser/bundles/platform-browser-testing.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.platformBrowser.testing',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/common': 'ng.common',
|
||||
'@angular/platform-browser': 'ng.platformBrowser'
|
||||
}
|
||||
};
|
|
@ -1,18 +0,0 @@
|
|||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export default {
|
||||
entry: '../../../dist/packages-dist/platform-browser/index.js',
|
||||
dest: '../../../dist/packages-dist/platform-browser/bundles/platform-browser.umd.js',
|
||||
format: 'umd',
|
||||
moduleName: 'ng.platformBrowser',
|
||||
globals: {
|
||||
'@angular/core': 'ng.core',
|
||||
'@angular/common': 'ng.common',
|
||||
}
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue