angular-cn/integration/ngcc/debug-test.sh
George Kalpakas 3f88de9407 build: move build scripts to dedicated directory (#35780)
This commit moves the build-related scripts
(`build-ivy-npm-packages.js`, `build-packages-dist.js` and
`package-builder.js`) to a dedicated directory to keep the `scripts/`
directory cleaner.

It also moves the logic for building the `zone.js` package to a separate
script, `zone-js-builder.js`, to make it re-usable. A subsequent commit
will use it to build the `zone.js` package when building the Ivy Angular
packages as well.

PR Close #35780
2020-03-04 08:35:26 -08:00

30 lines
666 B
Bash
Executable File

#!/usr/bin/env bash
##### Test Debug Utility #####
##############################
# Use this script to run the ngcc integration test locally
# in isolation from the other integration tests.
# This is useful when debugging the ngcc code-base.
set -u -e -o pipefail
cd "$(dirname "$0")"
node $(pwd)/../../scripts/build/build-packages-dist.js
# Workaround https://github.com/yarnpkg/yarn/issues/2165
# Yarn will cache file://dist URIs and not update Angular code
export readonly cache=../.yarn_local_cache
function rm_cache {
rm -rf $cache
}
rm_cache
mkdir $cache
trap rm_cache EXIT
rm -rf dist
rm -rf node_modules
yarn install --cache-folder $cache
yarn test