2018-04-23 14:46:02 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2019-03-20 09:47:57 -04:00
|
|
|
source $(dirname $0)/package-builder.sh
|
2018-04-23 14:46:02 -04:00
|
|
|
|
2019-01-14 20:47:39 -05:00
|
|
|
# Build the legacy (view engine) npm packages into dist/packages-dist
|
|
|
|
buildTargetPackages "dist/packages-dist" "legacy" "Production"
|
2019-11-11 10:11:34 -05:00
|
|
|
|
|
|
|
# Build the `zone.js` npm package (into `dist/bin/packages/zone.js/npm_package/`), because it might be needed
|
|
|
|
# by other scripts/tests.
|
|
|
|
#
|
|
|
|
# NOTE: The `zone.js` package is not built as part of `buildTargetPackages()` above, nor is it
|
|
|
|
# copied into the `dist/packages-dist/` directory (despite its source's being in `packages/`),
|
|
|
|
# because it is not published to npm under the `@angular` scope (as happens for the rest of
|
|
|
|
# the packages).
|
2019-11-14 02:28:29 -05:00
|
|
|
echo ""
|
|
|
|
echo "##############################"
|
|
|
|
echo "${script_path}:"
|
|
|
|
echo " Building zone.js npm package"
|
|
|
|
echo "##############################"
|
2019-11-11 10:11:34 -05:00
|
|
|
yarn --silent bazel build //packages/zone.js:npm_package
|
|
|
|
|
|
|
|
# Copy artifacts to `dist/zone.js-dist/`, so they can be easier persisted on CI.
|
|
|
|
readonly buildOutputDir="$base_dir/dist/bin/packages/zone.js/npm_package"
|
|
|
|
readonly distTargetDir="$base_dir/dist/zone.js-dist/zone.js"
|
|
|
|
|
2019-11-14 02:28:29 -05:00
|
|
|
echo "# Copy artifacts to $distTargetDir"
|
2019-11-11 10:11:34 -05:00
|
|
|
mkdir -p $distTargetDir
|
|
|
|
rm -rf $distTargetDir
|
|
|
|
cp -R $buildOutputDir $distTargetDir
|
|
|
|
chmod -R u+w $distTargetDir
|