2016-04-28 20:50:03 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-03-02 03:22:24 -05:00
|
|
|
set -u -e -o pipefail
|
|
|
|
|
2017-03-05 04:49:10 -05:00
|
|
|
readonly currentDir=$(cd $(dirname $0); pwd)
|
|
|
|
source ${currentDir}/scripts/ci/_travis-fold.sh
|
2016-04-28 20:50:03 -04:00
|
|
|
|
2017-03-05 04:49:10 -05:00
|
|
|
# TODO(i): wrap into subshell, so that we don't pollute CWD, but not yet to minimize diff collision with Jason
|
|
|
|
cd ${currentDir}
|
2016-04-28 20:50:03 -04:00
|
|
|
|
2016-09-13 12:49:23 -04:00
|
|
|
PACKAGES=(core
|
|
|
|
compiler
|
|
|
|
common
|
2017-02-22 18:14:49 -05:00
|
|
|
animations
|
2016-09-13 12:49:23 -04:00
|
|
|
platform-browser
|
|
|
|
platform-browser-dynamic
|
fix(forms): make composition event buffering configurable (#15256)
This commit fixes a regression where `ngModel` no longer syncs
letter by letter on Android devices, and instead syncs at the
end of every word. This broke when we introduced buffering of
IME events so IMEs like Pinyin keyboards or Katakana keyboards
wouldn't display composition strings. Unfortunately, iOS devices
and Android devices have opposite event behavior. Whereas iOS
devices fire composition events for IME keyboards only, Android
fires composition events for Latin-language keyboards. For
this reason, languages like English don't work as expected on
Android if we always buffer. So to support both platforms,
composition string buffering will only be turned on by default
for non-Android devices.
However, we have also added a `COMPOSITION_BUFFER_MODE` token
to make this configurable by the application. In some cases, apps
might might still want to receive intermediate values. For example,
some inputs begin searching based on Latin letters before a
character selection is made.
As a provider, this is fairly flexible. If you want to turn
composition buffering off, simply provide the token at the top
level:
```ts
providers: [
{provide: COMPOSITION_BUFFER_MODE, useValue: false}
]
```
Or, if you want to change the mode based on locale or platform,
you can use a factory:
```ts
import {shouldUseBuffering} from 'my/lib';
....
providers: [
{provide: COMPOSITION_BUFFER_MODE, useFactory: shouldUseBuffering}
]
```
Closes #15079.
PR Close #15256
2017-03-20 20:38:33 -04:00
|
|
|
forms
|
2017-02-10 20:00:27 -05:00
|
|
|
http
|
2016-09-13 12:49:23 -04:00
|
|
|
platform-server
|
|
|
|
platform-webworker
|
|
|
|
platform-webworker-dynamic
|
|
|
|
upgrade
|
2016-11-09 16:33:33 -05:00
|
|
|
router
|
2016-09-13 12:49:23 -04:00
|
|
|
compiler-cli
|
2016-11-22 12:10:23 -05:00
|
|
|
language-service
|
2017-09-28 19:18:12 -04:00
|
|
|
benchpress
|
2018-02-28 12:45:11 -05:00
|
|
|
service-worker
|
|
|
|
elements)
|
2017-01-27 20:39:48 -05:00
|
|
|
|
2017-09-20 12:54:47 -04:00
|
|
|
TSC_PACKAGES=(compiler-cli
|
|
|
|
language-service
|
|
|
|
benchpress)
|
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
NODE_PACKAGES=(compiler-cli
|
2017-09-20 12:54:47 -04:00
|
|
|
benchpress)
|
2017-03-02 16:54:35 -05:00
|
|
|
|
2018-03-01 17:31:10 -05:00
|
|
|
SCOPED_PACKAGES=$(
|
2018-03-07 19:26:52 -05:00
|
|
|
for P in ${PACKAGES[@]}; do echo \\@angular/${P}; done
|
2018-03-01 17:31:10 -05:00
|
|
|
)
|
2018-02-27 18:04:35 -05:00
|
|
|
NG_UPDATE_PACKAGE_GROUP=$(
|
2018-03-01 17:31:10 -05:00
|
|
|
# The first sed creates an array of strings
|
|
|
|
# The second sed is to allow it to be run in the perl expression so forward slashes don't end
|
|
|
|
# the regular expression.
|
|
|
|
echo \[\"${SCOPED_PACKAGES[@]}\"] \
|
|
|
|
| sed 's/ /", "/g' \
|
|
|
|
| sed 's/\//\\\//g'
|
2018-02-27 18:04:35 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2016-09-13 12:49:23 -04:00
|
|
|
BUILD_ALL=true
|
|
|
|
BUNDLE=true
|
2016-11-18 12:24:57 -05:00
|
|
|
VERSION_PREFIX=$(node -p "require('./package.json').version")
|
|
|
|
VERSION_SUFFIX="-$(git log --oneline -1 | awk '{print $1}')"
|
|
|
|
REMOVE_BENCHPRESS=false
|
2017-01-27 20:39:48 -05:00
|
|
|
BUILD_EXAMPLES=true
|
2017-03-02 16:54:35 -05:00
|
|
|
COMPILE_SOURCE=true
|
|
|
|
TYPECHECK_ALL=true
|
2017-03-15 16:26:09 -04:00
|
|
|
BUILD_TOOLS=true
|
2017-09-20 12:54:47 -04:00
|
|
|
export NODE_PATH=${NODE_PATH:-}:${currentDir}/dist/tools
|
2016-09-13 12:49:23 -04:00
|
|
|
|
|
|
|
for ARG in "$@"; do
|
|
|
|
case "$ARG" in
|
2017-03-15 16:26:09 -04:00
|
|
|
--quick-bundle=*)
|
|
|
|
COMPILE_SOURCE=false
|
|
|
|
TYPECHECK_ALL=false
|
|
|
|
BUILD_EXAMPLES=false
|
|
|
|
BUILD_TOOLS=false
|
|
|
|
;;
|
2016-09-13 12:49:23 -04:00
|
|
|
--packages=*)
|
|
|
|
PACKAGES_STR=${ARG#--packages=}
|
|
|
|
PACKAGES=( ${PACKAGES_STR//,/ } )
|
|
|
|
BUILD_ALL=false
|
|
|
|
;;
|
|
|
|
--bundle=*)
|
|
|
|
BUNDLE=( "${ARG#--bundle=}" )
|
|
|
|
;;
|
2016-11-18 12:24:57 -05:00
|
|
|
--publish)
|
|
|
|
VERSION_SUFFIX=""
|
|
|
|
REMOVE_BENCHPRESS=true
|
|
|
|
;;
|
2017-01-27 20:39:48 -05:00
|
|
|
--examples=*)
|
|
|
|
BUILD_EXAMPLES=${ARG#--examples=}
|
|
|
|
;;
|
2017-03-02 16:54:35 -05:00
|
|
|
--compile=*)
|
|
|
|
COMPILE_SOURCE=${ARG#--compile=}
|
|
|
|
;;
|
|
|
|
--typecheck=*)
|
|
|
|
TYPECHECK_ALL=${ARG#--typecheck=}
|
|
|
|
;;
|
2017-03-15 16:26:09 -04:00
|
|
|
--tools=*)
|
|
|
|
BUILD_TOOLS=${ARG#--tools=}
|
|
|
|
;;
|
2016-09-13 12:49:23 -04:00
|
|
|
*)
|
|
|
|
echo "Unknown option $ARG."
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
2016-05-02 01:54:19 -04:00
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
#######################################
|
|
|
|
# Verifies a directory isn't in the ignored list
|
|
|
|
# Arguments:
|
|
|
|
# param1 - Path to check
|
|
|
|
# Returns:
|
|
|
|
# Boolean
|
|
|
|
#######################################
|
|
|
|
isIgnoredDirectory() {
|
|
|
|
name=$(basename ${1})
|
2017-08-28 14:35:10 -04:00
|
|
|
if [[ -f "${1}" || "${name}" == "src" || "${name}" == "test" || "${name}" == "integrationtest" || "${name}" == "locales" ]]; then
|
2017-03-02 16:54:35 -05:00
|
|
|
return 0
|
|
|
|
else
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
# Check if array contains an element
|
|
|
|
# Arguments:
|
|
|
|
# param1 - Element to check
|
|
|
|
# param2 - Array to look for element in
|
|
|
|
# Returns:
|
|
|
|
# None
|
|
|
|
#######################################
|
|
|
|
containsElement () {
|
|
|
|
local e
|
|
|
|
for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done
|
|
|
|
return 1
|
2017-01-27 20:39:48 -05:00
|
|
|
}
|
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
#######################################
|
|
|
|
# Rollup index files recursively, ignoring blacklisted directories
|
|
|
|
# Arguments:
|
|
|
|
# param1 - Base source folder
|
2017-03-16 15:55:15 -04:00
|
|
|
# param2 - Destination directory
|
2017-09-13 19:20:29 -04:00
|
|
|
# param3 - Package name
|
|
|
|
# param4 - Is sub directory
|
2017-03-02 16:54:35 -05:00
|
|
|
# Returns:
|
|
|
|
# None
|
|
|
|
#######################################
|
|
|
|
rollupIndex() {
|
|
|
|
# Iterate over the files in this directory, rolling up each into ${2} directory
|
2017-09-13 19:20:29 -04:00
|
|
|
in_file="${1}/${3}.js"
|
|
|
|
if [ ${4:-} ]; then
|
|
|
|
out_file="$(dropLast ${2})/${3}.js"
|
|
|
|
else
|
|
|
|
out_file="${2}/${3}.js"
|
|
|
|
fi
|
2017-03-02 16:54:35 -05:00
|
|
|
|
2017-08-02 22:15:30 -04:00
|
|
|
BANNER_TEXT=`cat ${LICENSE_BANNER}`
|
|
|
|
if [[ -f ${in_file} ]]; then
|
2017-09-13 19:20:29 -04:00
|
|
|
echo "=========== $ROLLUP -i ${in_file} -o ${out_file} --sourcemap -f es --banner BANNER_TEXT >/dev/null 2>&1"
|
2017-08-02 22:15:30 -04:00
|
|
|
$ROLLUP -i ${in_file} -o ${out_file} --sourcemap -f es --banner "$BANNER_TEXT" >/dev/null 2>&1
|
2017-03-02 16:54:35 -05:00
|
|
|
fi
|
|
|
|
|
2017-08-02 22:15:30 -04:00
|
|
|
# Recurse for sub directories
|
|
|
|
for DIR in ${1}/* ; do
|
2017-09-13 19:20:29 -04:00
|
|
|
local sub_package=$(basename "${DIR}")
|
2017-08-02 22:15:30 -04:00
|
|
|
isIgnoredDirectory ${DIR} && continue
|
2017-09-13 19:20:29 -04:00
|
|
|
local regex=".+/(.+)/${sub_package}.js"
|
|
|
|
if [[ "${DIR}/${sub_package}.js" =~ $regex ]]; then
|
|
|
|
|
|
|
|
rollupIndex ${DIR} ${2}/${BASH_REMATCH[1]} ${sub_package} true
|
2017-08-02 22:15:30 -04:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
2017-03-02 16:54:35 -05:00
|
|
|
|
|
|
|
#######################################
|
|
|
|
# Recursively runs rollup on any entry point that has a "rollup.config.js" file
|
|
|
|
# Arguments:
|
|
|
|
# param1 - Base source folder containing rollup.config.js
|
|
|
|
# Returns:
|
|
|
|
# None
|
|
|
|
#######################################
|
|
|
|
runRollup() {
|
2017-03-16 15:55:15 -04:00
|
|
|
if [[ -f "${1}/rollup.config.js" ]]; then
|
2017-03-02 16:54:35 -05:00
|
|
|
cd ${1}
|
|
|
|
|
2017-09-20 12:54:47 -04:00
|
|
|
echo "====== $ROLLUP -c ${1}/rollup.config.js --sourcemap"
|
2017-08-02 22:15:30 -04:00
|
|
|
$ROLLUP -c rollup.config.js --sourcemap >/dev/null 2>&1
|
2017-03-02 16:54:35 -05:00
|
|
|
|
|
|
|
# Recurse for sub directories
|
|
|
|
for DIR in ${1}/* ; do
|
|
|
|
isIgnoredDirectory ${DIR} && continue
|
|
|
|
runRollup ${DIR}
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
# Adds banners to all files in a directory
|
|
|
|
# Arguments:
|
|
|
|
# param1 - Directory to add license banners to
|
|
|
|
# Returns:
|
|
|
|
# None
|
|
|
|
#######################################
|
|
|
|
addBanners() {
|
|
|
|
for file in ${1}/*; do
|
2017-03-16 15:55:15 -04:00
|
|
|
if [[ -f ${file} && "${file##*.}" != "map" ]]; then
|
2017-03-02 16:54:35 -05:00
|
|
|
cat ${LICENSE_BANNER} > ${file}.tmp
|
|
|
|
cat ${file} >> ${file}.tmp
|
|
|
|
mv ${file}.tmp ${file}
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
# Minifies files in a directory
|
|
|
|
# Arguments:
|
|
|
|
# param1 - Directory to minify
|
|
|
|
# Returns:
|
|
|
|
# None
|
|
|
|
#######################################
|
|
|
|
minify() {
|
|
|
|
# Iterate over the files in this directory, rolling up each into ${2} directory
|
|
|
|
regex="(.+).js"
|
|
|
|
files=(${1}/*)
|
|
|
|
echo "${files[@]}"
|
|
|
|
for file in "${files[@]}"; do
|
|
|
|
echo "${file}"
|
|
|
|
base_file=$( basename "${file}" )
|
2017-03-16 15:55:15 -04:00
|
|
|
if [[ "${base_file}" =~ $regex && "${base_file##*.}" != "map" ]]; then
|
|
|
|
local out_file=$(dirname "${file}")/${BASH_REMATCH[1]}.min.js
|
2018-03-10 00:01:53 -05:00
|
|
|
echo "====== $UGLIFY -c --comments -o ${out_file} --source-map "includeSources=true,content='${file}.map',filename='${out_file}.map'" ${file}"
|
|
|
|
$UGLIFY -c --comments -o ${out_file} --source-map "includeSources=true,content='${file}.map',filename='${out_file}.map'" ${file}
|
2017-03-02 16:54:35 -05:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
# Recursively compile package
|
|
|
|
# Arguments:
|
|
|
|
# param1 - Source directory
|
|
|
|
# param2 - Out dir
|
|
|
|
# param3 - Package Name
|
|
|
|
# Returns:
|
|
|
|
# None
|
|
|
|
#######################################
|
|
|
|
compilePackage() {
|
2017-09-20 12:54:47 -04:00
|
|
|
# For TSC_PACKAGES items
|
|
|
|
if containsElement "${3}" "${TSC_PACKAGES[@]}"; then
|
|
|
|
echo "====== [${3}]: COMPILING: ${TSC} -p ${1}/tsconfig-build.json"
|
2017-03-02 16:54:35 -05:00
|
|
|
$TSC -p ${1}/tsconfig-build.json
|
|
|
|
else
|
2017-09-20 12:54:47 -04:00
|
|
|
echo "====== [${3}]: COMPILING: ${NGC} -p ${1}/tsconfig-build.json"
|
2017-03-02 16:54:35 -05:00
|
|
|
local package_name=$(basename "${2}")
|
|
|
|
$NGC -p ${1}/tsconfig-build.json
|
2017-09-11 04:53:35 -04:00
|
|
|
if [[ "${package_name}" != "locales" ]]; then
|
|
|
|
echo "====== Create ${1}/../${package_name}.d.ts re-export file for tsickle"
|
|
|
|
echo "$(cat ${LICENSE_BANNER}) ${N} export * from './${package_name}/${package_name}'" > ${2}/../${package_name}.d.ts
|
|
|
|
echo "{\"__symbolic\":\"module\",\"version\":3,\"metadata\":{},\"exports\":[{\"from\":\"./${package_name}/${package_name}\"}],\"flatModuleIndexRedirect\":true}" > ${2}/../${package_name}.metadata.json
|
|
|
|
fi
|
2017-03-02 16:54:35 -05:00
|
|
|
fi
|
|
|
|
|
2017-09-28 19:18:12 -04:00
|
|
|
# Build subpackages
|
2017-03-02 16:54:35 -05:00
|
|
|
for DIR in ${1}/* ; do
|
|
|
|
[ -d "${DIR}" ] || continue
|
|
|
|
BASE_DIR=$(basename "${DIR}")
|
|
|
|
# Skip over directories that are not nested entry points
|
|
|
|
[[ -e ${DIR}/tsconfig-build.json && "${BASE_DIR}" != "integrationtest" ]] || continue
|
2017-08-02 22:15:30 -04:00
|
|
|
compilePackage ${DIR} ${2}/${BASE_DIR} ${3}
|
2017-03-02 16:54:35 -05:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
#######################################
|
2017-08-02 22:15:30 -04:00
|
|
|
# Recursively compile package
|
2017-03-02 16:54:35 -05:00
|
|
|
# Arguments:
|
2017-08-02 22:15:30 -04:00
|
|
|
# param1 - Source directory
|
|
|
|
# param2 - Out dir
|
|
|
|
# param3 - Package Name
|
2017-03-02 16:54:35 -05:00
|
|
|
# Returns:
|
|
|
|
# None
|
|
|
|
#######################################
|
2017-08-02 22:15:30 -04:00
|
|
|
compilePackageES5() {
|
2017-09-20 12:54:47 -04:00
|
|
|
if containsElement "${3}" "${TSC_PACKAGES[@]}"; then
|
|
|
|
echo "====== [${3}]: COMPILING: ${TSC} -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap"
|
|
|
|
local package_name=$(basename "${2}")
|
|
|
|
$TSC -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap
|
|
|
|
else
|
|
|
|
echo "====== [${3}]: COMPILING: ${NGC} -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap"
|
|
|
|
local package_name=$(basename "${2}")
|
|
|
|
$NGC -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap
|
|
|
|
fi
|
2017-08-02 22:15:30 -04:00
|
|
|
|
|
|
|
for DIR in ${1}/* ; do
|
|
|
|
[ -d "${DIR}" ] || continue
|
|
|
|
BASE_DIR=$(basename "${DIR}")
|
|
|
|
# Skip over directories that are not nested entry points
|
|
|
|
[[ -e ${DIR}/tsconfig-build.json && "${BASE_DIR}" != "integrationtest" ]] || continue
|
|
|
|
compilePackageES5 ${DIR} ${2} ${3}
|
|
|
|
done
|
2017-03-02 16:54:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
# Adds a package.json in directories where needed (secondary entry point typings).
|
|
|
|
# This is read by NGC to be able to find the flat module index.
|
|
|
|
# Arguments:
|
|
|
|
# param1 - Source directory of typings files
|
|
|
|
# Returns:
|
|
|
|
# None
|
|
|
|
#######################################
|
|
|
|
addNgcPackageJson() {
|
|
|
|
for DIR in ${1}/* ; do
|
|
|
|
[ -d "${DIR}" ] || continue
|
2017-09-13 19:20:29 -04:00
|
|
|
# Confirm there is an ${PACKAGE}.d.ts and ${PACKAGE}.metadata.json file. If so, create
|
2017-03-02 16:54:35 -05:00
|
|
|
# the package.json and recurse.
|
2017-09-13 19:20:29 -04:00
|
|
|
if [[ -f ${DIR}/${PACKAGE}.d.ts && -f ${DIR}/${PACKAGE}.metadata.json ]]; then
|
|
|
|
echo '{"typings": "${PACKAGE}.d.ts"}' > ${DIR}/package.json
|
2017-03-02 16:54:35 -05:00
|
|
|
addNgcPackageJson ${DIR}
|
|
|
|
fi
|
|
|
|
done
|
2017-01-27 20:39:48 -05:00
|
|
|
}
|
|
|
|
|
2017-08-21 11:23:47 -04:00
|
|
|
updateVersionReferences() {
|
|
|
|
NPM_DIR="$1"
|
|
|
|
(
|
|
|
|
echo "====== VERSION: Updating version references in ${NPM_DIR}"
|
|
|
|
cd ${NPM_DIR}
|
|
|
|
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
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2017-09-13 19:20:29 -04:00
|
|
|
#######################################
|
|
|
|
# Drops the last entry of a path. Similar to normalizing a path such as
|
|
|
|
# /parent/child/.. to /parent.
|
|
|
|
# Arguments:
|
|
|
|
# param1 - Directory on which to drop the last item
|
|
|
|
# Returns:
|
|
|
|
# None
|
|
|
|
#######################################
|
|
|
|
|
|
|
|
dropLast() {
|
|
|
|
local last_item=$(basename ${1})
|
|
|
|
local regex=local regex="(.+)/${last_item}"
|
|
|
|
if [[ "${1}" =~ $regex ]]; then
|
|
|
|
echo "${BASH_REMATCH[1]}"
|
|
|
|
else
|
|
|
|
echo "${1}"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2016-11-18 12:24:57 -05:00
|
|
|
VERSION="${VERSION_PREFIX}${VERSION_SUFFIX}"
|
2017-05-22 13:06:46 -04:00
|
|
|
echo "====== BUILDING: Version ${VERSION}"
|
2016-11-18 12:24:57 -05:00
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
N="
|
|
|
|
"
|
|
|
|
TSC=`pwd`/node_modules/.bin/tsc
|
2017-09-20 12:54:47 -04:00
|
|
|
NGC="node --max-old-space-size=3000 `pwd`/dist/tools/@angular/compiler-cli/src/main"
|
2018-03-10 00:01:53 -05:00
|
|
|
UGLIFY=`pwd`/node_modules/.bin/uglifyjs
|
2016-05-19 18:28:25 -04:00
|
|
|
TSCONFIG=./tools/tsconfig.json
|
2017-03-02 16:54:35 -05:00
|
|
|
ROLLUP=`pwd`/node_modules/.bin/rollup
|
2016-09-13 12:49:23 -04:00
|
|
|
|
2017-03-15 16:26:09 -04:00
|
|
|
if [[ ${BUILD_TOOLS} == true ]]; then
|
|
|
|
travisFoldStart "build tools" "no-xtrace"
|
|
|
|
echo "====== (tools)COMPILING: \$(npm bin)/tsc -p ${TSCONFIG} ====="
|
|
|
|
rm -rf ./dist/tools/
|
|
|
|
mkdir -p ./dist/tools/
|
|
|
|
$(npm bin)/tsc -p ${TSCONFIG}
|
|
|
|
travisFoldEnd "build tools"
|
|
|
|
fi
|
2017-03-02 03:22:24 -05:00
|
|
|
|
2016-05-19 18:28:25 -04:00
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
if [[ ${BUILD_ALL} == true && ${TYPECHECK_ALL} == true ]]; then
|
2017-03-15 16:26:09 -04:00
|
|
|
travisFoldStart "clean dist" "no-xtrace"
|
2017-03-02 03:22:24 -05:00
|
|
|
rm -rf ./dist/all/
|
2017-03-02 16:54:35 -05:00
|
|
|
rm -rf ./dist/packages
|
2017-03-02 03:22:24 -05:00
|
|
|
travisFoldEnd "clean dist"
|
|
|
|
|
2017-03-15 16:26:09 -04:00
|
|
|
travisFoldStart "copy e2e files" "no-xtrace"
|
2017-03-02 03:22:24 -05:00
|
|
|
mkdir -p ./dist/all/
|
|
|
|
|
2017-05-12 15:07:51 -04:00
|
|
|
(
|
|
|
|
echo "====== Copying files needed for e2e tests ====="
|
|
|
|
cp -r ./modules/playground ./dist/all/
|
|
|
|
cp -r ./modules/playground/favicon.ico ./dist/
|
|
|
|
#rsync -aP ./modules/playground/* ./dist/all/playground/
|
|
|
|
mkdir ./dist/all/playground/vendor
|
|
|
|
cd ./dist/all/playground/vendor
|
|
|
|
ln -s ../../../../node_modules/core-js/client/core.js .
|
|
|
|
ln -s ../../../../node_modules/zone.js/dist/zone.js .
|
|
|
|
ln -s ../../../../node_modules/zone.js/dist/long-stack-trace-zone.js .
|
|
|
|
ln -s ../../../../node_modules/systemjs/dist/system.src.js .
|
|
|
|
ln -s ../../../../node_modules/base64-js .
|
|
|
|
ln -s ../../../../node_modules/reflect-metadata/Reflect.js .
|
|
|
|
ln -s ../../../../node_modules/rxjs .
|
|
|
|
ln -s ../../../../node_modules/angular/angular.js .
|
|
|
|
ln -s ../../../../node_modules/hammerjs/hammer.js .
|
|
|
|
)
|
|
|
|
|
|
|
|
(
|
|
|
|
echo "====== Copying files needed for benchmarks ====="
|
|
|
|
cp -r ./modules/benchmarks ./dist/all/
|
|
|
|
cp -r ./modules/benchmarks/favicon.ico ./dist/
|
|
|
|
mkdir ./dist/all/benchmarks/vendor
|
|
|
|
cd ./dist/all/benchmarks/vendor
|
|
|
|
ln -s ../../../../node_modules/core-js/client/core.js .
|
|
|
|
ln -s ../../../../node_modules/zone.js/dist/zone.js .
|
|
|
|
ln -s ../../../../node_modules/zone.js/dist/long-stack-trace-zone.js .
|
|
|
|
ln -s ../../../../node_modules/systemjs/dist/system.src.js .
|
|
|
|
ln -s ../../../../node_modules/reflect-metadata/Reflect.js .
|
|
|
|
ln -s ../../../../node_modules/rxjs .
|
|
|
|
ln -s ../../../../node_modules/angular/angular.js .
|
|
|
|
ln -s ../../../../bower_components/polymer .
|
|
|
|
ln -s ../../../../node_modules/incremental-dom/dist/incremental-dom-cjs.js
|
|
|
|
)
|
2017-03-02 03:22:24 -05:00
|
|
|
travisFoldEnd "copy e2e files"
|
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
TSCONFIG="packages/tsconfig.json"
|
2017-03-15 16:26:09 -04:00
|
|
|
travisFoldStart "tsc -p ${TSCONFIG}" "no-xtrace"
|
2017-07-16 13:47:46 -04:00
|
|
|
$TSC -p ${TSCONFIG}
|
2017-03-02 03:22:24 -05:00
|
|
|
travisFoldEnd "tsc -p ${TSCONFIG}"
|
2017-03-02 16:54:35 -05:00
|
|
|
TSCONFIG="modules/tsconfig.json"
|
2017-03-15 16:26:09 -04:00
|
|
|
travisFoldStart "tsc -p ${TSCONFIG}" "no-xtrace"
|
2017-07-16 13:47:46 -04:00
|
|
|
$TSC -p ${TSCONFIG}
|
2017-03-02 16:54:35 -05:00
|
|
|
travisFoldEnd "tsc -p ${TSCONFIG}"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ${BUILD_ALL} == true ]]; then
|
|
|
|
rm -rf ./dist/packages
|
|
|
|
if [[ ${BUNDLE} == true ]]; then
|
|
|
|
rm -rf ./dist/packages-dist
|
|
|
|
fi
|
2016-09-13 12:49:23 -04:00
|
|
|
fi
|
|
|
|
|
2017-07-16 13:47:46 -04:00
|
|
|
if [[ ${BUILD_TOOLS} == true || ${BUILD_ALL} == true ]]; then
|
2017-09-20 12:54:47 -04:00
|
|
|
echo "====== (compiler)COMPILING: \$(npm bin)/tsc -p packages/compiler/tsconfig-tools.json"
|
|
|
|
$(npm bin)/tsc -p packages/compiler/tsconfig-tools.json
|
|
|
|
echo "====== (compiler)COMPILING: \$(npm bin)/tsc -p packages/compiler-cli/tsconfig-tools.json"
|
|
|
|
$(npm bin)/tsc -p packages/compiler-cli/tsconfig-tools.json
|
2017-08-21 11:23:47 -04:00
|
|
|
|
2017-09-20 12:54:47 -04:00
|
|
|
mkdir -p ./dist/packages-dist
|
2017-08-21 11:23:47 -04:00
|
|
|
rsync -a packages/bazel/ ./dist/packages-dist/bazel
|
2017-12-19 18:03:29 -05:00
|
|
|
echo "workspace(name=\"angular\")" > ./dist/packages-dist/bazel/WORKSPACE
|
2017-08-21 11:23:47 -04:00
|
|
|
# Remove BEGIN-INTERNAL...END-INTERAL blocks
|
|
|
|
# https://stackoverflow.com/questions/24175271/how-can-i-match-multi-line-patterns-in-the-command-line-with-perl-style-regex
|
|
|
|
perl -0777 -n -i -e "s/(?m)^.*BEGIN-INTERNAL[\w\W]*END-INTERNAL.*\n//g; print" $(grep -ril BEGIN-INTERNAL dist/packages-dist/bazel) < /dev/null 2> /dev/null
|
2017-12-19 18:03:29 -05:00
|
|
|
# Re-host //packages/bazel/ which is just // in the public distro
|
|
|
|
perl -0777 -n -i -e "s#//packages/bazel/#//#g; print" $(grep -ril packages/bazel dist/packages-dist/bazel) < /dev/null 2> /dev/null
|
|
|
|
perl -0777 -n -i -e "s#angular/packages/bazel/#angular/#g; print" $(grep -ril packages/bazel dist/packages-dist/bazel) < /dev/null 2> /dev/null
|
2017-08-21 11:23:47 -04:00
|
|
|
updateVersionReferences dist/packages-dist/bazel
|
2017-07-16 13:47:46 -04:00
|
|
|
fi
|
|
|
|
|
2016-09-13 12:49:23 -04:00
|
|
|
for PACKAGE in ${PACKAGES[@]}
|
2016-04-28 20:50:03 -04:00
|
|
|
do
|
2017-03-15 16:26:09 -04:00
|
|
|
travisFoldStart "build package: ${PACKAGE}" "no-xtrace"
|
2016-08-30 21:07:40 -04:00
|
|
|
PWD=`pwd`
|
2017-03-02 16:54:35 -05:00
|
|
|
ROOT_DIR=${PWD}/packages
|
|
|
|
SRC_DIR=${ROOT_DIR}/${PACKAGE}
|
|
|
|
ROOT_OUT_DIR=${PWD}/dist/packages
|
|
|
|
OUT_DIR=${ROOT_OUT_DIR}/${PACKAGE}
|
2017-08-02 22:15:30 -04:00
|
|
|
OUT_DIR_ESM5=${ROOT_OUT_DIR}/${PACKAGE}/esm5
|
2017-03-02 16:54:35 -05:00
|
|
|
NPM_DIR=${PWD}/dist/packages-dist/${PACKAGE}
|
2017-09-13 19:20:29 -04:00
|
|
|
ESM2015_DIR=${NPM_DIR}/esm2015
|
2017-08-02 22:15:30 -04:00
|
|
|
ESM5_DIR=${NPM_DIR}/esm5
|
2017-03-02 16:54:35 -05:00
|
|
|
BUNDLES_DIR=${NPM_DIR}/bundles
|
2016-11-16 12:17:19 -05:00
|
|
|
|
2017-05-22 13:06:46 -04:00
|
|
|
LICENSE_BANNER=${ROOT_DIR}/license-banner.txt
|
2016-04-28 20:50:03 -04:00
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
if [[ ${COMPILE_SOURCE} == true ]]; then
|
|
|
|
rm -rf ${OUT_DIR}
|
|
|
|
rm -f ${ROOT_OUT_DIR}/${PACKAGE}.js
|
|
|
|
compilePackage ${SRC_DIR} ${OUT_DIR} ${PACKAGE}
|
2017-01-12 20:35:02 -05:00
|
|
|
fi
|
2016-05-03 16:43:35 -04:00
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
if [[ ${BUNDLE} == true ]]; then
|
|
|
|
echo "====== BUNDLING ${PACKAGE}: ${SRC_DIR} ====="
|
|
|
|
rm -rf ${NPM_DIR} && mkdir -p ${NPM_DIR}
|
2017-01-27 20:39:48 -05:00
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
if ! containsElement "${PACKAGE}" "${NODE_PACKAGES[@]}"; then
|
2016-11-09 16:33:33 -05:00
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
echo "====== Copy ${PACKAGE} typings"
|
2017-03-15 16:26:09 -04:00
|
|
|
rsync -a --exclude=*.js --exclude=*.js.map ${OUT_DIR}/ ${NPM_DIR}
|
2016-04-28 20:50:03 -04:00
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
(
|
|
|
|
cd ${SRC_DIR}
|
|
|
|
echo "====== Rollup ${PACKAGE}"
|
2017-09-13 19:20:29 -04:00
|
|
|
rollupIndex ${OUT_DIR} ${ESM2015_DIR} ${PACKAGE}
|
2017-01-27 20:39:48 -05:00
|
|
|
|
2017-08-02 22:15:30 -04:00
|
|
|
echo "====== Produce ESM5 version"
|
|
|
|
compilePackageES5 ${SRC_DIR} ${OUT_DIR_ESM5} ${PACKAGE}
|
2017-09-13 19:20:29 -04:00
|
|
|
rollupIndex ${OUT_DIR_ESM5} ${ESM5_DIR} ${PACKAGE}
|
2017-01-27 20:39:48 -05:00
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
echo "====== Run rollup conversions on ${PACKAGE}"
|
|
|
|
runRollup ${SRC_DIR}
|
|
|
|
addBanners ${BUNDLES_DIR}
|
|
|
|
minify ${BUNDLES_DIR}
|
2017-02-22 18:14:49 -05:00
|
|
|
|
2017-09-28 19:18:12 -04:00
|
|
|
if [[ -e ${SRC_DIR}/build.sh ]]; then
|
|
|
|
echo "====== Custom build for ${PACKAGE}"
|
|
|
|
cd ${SRC_DIR} && ${SRC_DIR}/build.sh
|
|
|
|
fi
|
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
) 2>&1 | grep -v "as external dependency"
|
feat(common): drop use of the Intl API to improve browser support (#18284)
BREAKING CHANGE: Because of multiple bugs and browser inconsistencies, we have dropped the intl api in favor of data exported from the Unicode Common Locale Data Repository (CLDR).
Unfortunately we had to change the i18n pipes (date, number, currency, percent) and there are some breaking changes.
1. I18n pipes
* Breaking change:
- By default Angular now only contains locale data for the language `en-US`, if you set the value of `LOCALE_ID` to another locale, you will have to import new locale data for this language because we don't use the intl API anymore.
* Features:
- you don't need to use the intl polyfill for Angular anymore.
- all i18n pipes now have an additional last parameter `locale` which allows you to use a specific locale instead of the one defined in the token `LOCALE_ID` (whose value is `en-US` by default).
- the new locale data extracted from CLDR are now available to developers as well and can be used through an API (which should be especially useful for library authors).
- you can still use the old pipes for now, but their names have been changed and they are no longer included in the `CommonModule`. To use them, you will have to import the `DeprecatedI18NPipesModule` after the `CommonModule` (the order is important):
```ts
import { NgModule } from '@angular/core';
import { CommonModule, DeprecatedI18NPipesModule } from '@angular/common';
@NgModule({
imports: [
CommonModule,
// import deprecated module after
DeprecatedI18NPipesModule
]
})
export class AppModule { }
```
Dont forget that you will still need to import the intl API polyfill if you want to use those deprecated pipes.
2. Date pipe
* Breaking changes:
- the predefined formats (`short`, `shortTime`, `shortDate`, `medium`, ...) now use the patterns given by CLDR (like it was in AngularJS) instead of the ones from the intl API. You might notice some changes, e.g. `shortDate` will be `8/15/17` instead of `8/15/2017` for `en-US`.
- the narrow version of eras is now `GGGGG` instead of `G`, the format `G` is now similar to `GG` and `GGG`.
- the narrow version of months is now `MMMMM` instead of `L`, the format `L` is now the short standalone version of months.
- the narrow version of the week day is now `EEEEE` instead of `E`, the format `E` is now similar to `EE` and `EEE`.
- the timezone `z` will now fallback to `O` and output `GMT+1` instead of the complete zone name (e.g. `Pacific Standard Time`), this is because the quantity of data required to have all the zone names in all of the existing locales is too big.
- the timezone `Z` will now output the ISO8601 basic format, e.g. `+0100`, you should now use `ZZZZ` to get `GMT+01:00`.
| Field type | Format | Example value | v4 | v5 |
|------------|---------------|-----------------------|----|---------------|
| Eras | Narrow | A for AD | G | GGGGG |
| Months | Narrow | S for September | L | MMMMM |
| Week day | Narrow | M for Monday | E | EEEEE |
| Timezone | Long location | Pacific Standard Time | z | Not available |
| Timezone | Long GMT | GMT+01:00 | Z | ZZZZ |
* Features
- new predefined formats `long`, `full`, `longTime`, `fullTime`.
- the format `yyy` is now supported, e.g. the year `52` will be `052` and the year `2017` will be `2017`.
- standalone months are now supported with the formats `L` to `LLLLL`.
- week of the year is now supported with the formats `w` and `ww`, e.g. weeks `5` and `05`.
- week of the month is now supported with the format `W`, e.g. week `3`.
- fractional seconds are now supported with the format `S` to `SSS`.
- day periods for AM/PM now supports additional formats `aa`, `aaa`, `aaaa` and `aaaaa`. The formats `a` to `aaa` are similar, while `aaaa` is the wide version if available (e.g. `ante meridiem` for `am`), or equivalent to `a` otherwise, and `aaaaa` is the narrow version (e.g. `a` for `am`).
- extra day periods are now supported with the formats `b` to `bbbbb` (and `B` to `BBBBB` for the standalone equivalents), e.g. `morning`, `noon`, `afternoon`, ....
- the short non-localized timezones are now available with the format `O` to `OOOO`. The formats `O` to `OOO` will output `GMT+1` while the format `OOOO` will be `GMT+01:00`.
- the ISO8601 basic time zones are now available with the formats `Z` to `ZZZZZ`. The formats `Z` to `ZZZ` will output `+0100`, while the format `ZZZZ` will be `GMT+01:00` and `ZZZZZ` will be `+01:00`.
* Bug fixes
- the date pipe will now work exactly the same across all browsers, which will fix a lot of bugs for safari and IE.
- eras can now be used on their own without the date, e.g. the format `GG` will be `AD` instead of `8 15, 2017 AD`.
3. Currency pipe
* Breaking change:
- the default value for `symbolDisplay` is now `symbol` instead of `code`. This means that by default you will see `$4.99` for `en-US` instead of `USD4.99` previously.
* Deprecation:
- the second parameter of the currency pipe (`symbolDisplay`) is no longer a boolean, it now takes the values `code`, `symbol` or `symbol-narrow`. A boolean value is still valid for now, but it is deprecated and it will print a warning message in the console.
* Features:
- you can now choose between `code`, `symbol` or `symbol-narrow` which gives you access to more options for some currencies (e.g. the canadian dollar with the code `CAD` has the symbol `CA$` and the symbol-narrow `$`).
4. Percent pipe
* Breaking change
- if you don't specify the number of digits to round to, the local format will be used (and it usually rounds numbers to 0 digits, instead of not rounding previously), e.g. `{{ 3.141592 | percent }}` will output `314%` for the locale `en-US` instead of `314.1592%` previously.
Fixes #10809, #9524, #7008, #9324, #7590, #6724, #3429, #17576, #17478, #17319, #17200, #16838, #16624, #16625, #16591, #14131, #12632, #11376, #11187
PR Close #18284
2017-08-22 14:30:59 -04:00
|
|
|
|
|
|
|
if [[ ${PACKAGE} == "common" ]]; then
|
|
|
|
echo "====== Copy i18n locale data"
|
2017-12-11 09:41:43 -05:00
|
|
|
rsync -a ${OUT_DIR}/locales/ ${NPM_DIR}/locales
|
feat(common): drop use of the Intl API to improve browser support (#18284)
BREAKING CHANGE: Because of multiple bugs and browser inconsistencies, we have dropped the intl api in favor of data exported from the Unicode Common Locale Data Repository (CLDR).
Unfortunately we had to change the i18n pipes (date, number, currency, percent) and there are some breaking changes.
1. I18n pipes
* Breaking change:
- By default Angular now only contains locale data for the language `en-US`, if you set the value of `LOCALE_ID` to another locale, you will have to import new locale data for this language because we don't use the intl API anymore.
* Features:
- you don't need to use the intl polyfill for Angular anymore.
- all i18n pipes now have an additional last parameter `locale` which allows you to use a specific locale instead of the one defined in the token `LOCALE_ID` (whose value is `en-US` by default).
- the new locale data extracted from CLDR are now available to developers as well and can be used through an API (which should be especially useful for library authors).
- you can still use the old pipes for now, but their names have been changed and they are no longer included in the `CommonModule`. To use them, you will have to import the `DeprecatedI18NPipesModule` after the `CommonModule` (the order is important):
```ts
import { NgModule } from '@angular/core';
import { CommonModule, DeprecatedI18NPipesModule } from '@angular/common';
@NgModule({
imports: [
CommonModule,
// import deprecated module after
DeprecatedI18NPipesModule
]
})
export class AppModule { }
```
Dont forget that you will still need to import the intl API polyfill if you want to use those deprecated pipes.
2. Date pipe
* Breaking changes:
- the predefined formats (`short`, `shortTime`, `shortDate`, `medium`, ...) now use the patterns given by CLDR (like it was in AngularJS) instead of the ones from the intl API. You might notice some changes, e.g. `shortDate` will be `8/15/17` instead of `8/15/2017` for `en-US`.
- the narrow version of eras is now `GGGGG` instead of `G`, the format `G` is now similar to `GG` and `GGG`.
- the narrow version of months is now `MMMMM` instead of `L`, the format `L` is now the short standalone version of months.
- the narrow version of the week day is now `EEEEE` instead of `E`, the format `E` is now similar to `EE` and `EEE`.
- the timezone `z` will now fallback to `O` and output `GMT+1` instead of the complete zone name (e.g. `Pacific Standard Time`), this is because the quantity of data required to have all the zone names in all of the existing locales is too big.
- the timezone `Z` will now output the ISO8601 basic format, e.g. `+0100`, you should now use `ZZZZ` to get `GMT+01:00`.
| Field type | Format | Example value | v4 | v5 |
|------------|---------------|-----------------------|----|---------------|
| Eras | Narrow | A for AD | G | GGGGG |
| Months | Narrow | S for September | L | MMMMM |
| Week day | Narrow | M for Monday | E | EEEEE |
| Timezone | Long location | Pacific Standard Time | z | Not available |
| Timezone | Long GMT | GMT+01:00 | Z | ZZZZ |
* Features
- new predefined formats `long`, `full`, `longTime`, `fullTime`.
- the format `yyy` is now supported, e.g. the year `52` will be `052` and the year `2017` will be `2017`.
- standalone months are now supported with the formats `L` to `LLLLL`.
- week of the year is now supported with the formats `w` and `ww`, e.g. weeks `5` and `05`.
- week of the month is now supported with the format `W`, e.g. week `3`.
- fractional seconds are now supported with the format `S` to `SSS`.
- day periods for AM/PM now supports additional formats `aa`, `aaa`, `aaaa` and `aaaaa`. The formats `a` to `aaa` are similar, while `aaaa` is the wide version if available (e.g. `ante meridiem` for `am`), or equivalent to `a` otherwise, and `aaaaa` is the narrow version (e.g. `a` for `am`).
- extra day periods are now supported with the formats `b` to `bbbbb` (and `B` to `BBBBB` for the standalone equivalents), e.g. `morning`, `noon`, `afternoon`, ....
- the short non-localized timezones are now available with the format `O` to `OOOO`. The formats `O` to `OOO` will output `GMT+1` while the format `OOOO` will be `GMT+01:00`.
- the ISO8601 basic time zones are now available with the formats `Z` to `ZZZZZ`. The formats `Z` to `ZZZ` will output `+0100`, while the format `ZZZZ` will be `GMT+01:00` and `ZZZZZ` will be `+01:00`.
* Bug fixes
- the date pipe will now work exactly the same across all browsers, which will fix a lot of bugs for safari and IE.
- eras can now be used on their own without the date, e.g. the format `GG` will be `AD` instead of `8 15, 2017 AD`.
3. Currency pipe
* Breaking change:
- the default value for `symbolDisplay` is now `symbol` instead of `code`. This means that by default you will see `$4.99` for `en-US` instead of `USD4.99` previously.
* Deprecation:
- the second parameter of the currency pipe (`symbolDisplay`) is no longer a boolean, it now takes the values `code`, `symbol` or `symbol-narrow`. A boolean value is still valid for now, but it is deprecated and it will print a warning message in the console.
* Features:
- you can now choose between `code`, `symbol` or `symbol-narrow` which gives you access to more options for some currencies (e.g. the canadian dollar with the code `CAD` has the symbol `CA$` and the symbol-narrow `$`).
4. Percent pipe
* Breaking change
- if you don't specify the number of digits to round to, the local format will be used (and it usually rounds numbers to 0 digits, instead of not rounding previously), e.g. `{{ 3.141592 | percent }}` will output `314%` for the locale `en-US` instead of `314.1592%` previously.
Fixes #10809, #9524, #7008, #9324, #7590, #6724, #3429, #17576, #17478, #17319, #17200, #16838, #16624, #16625, #16591, #14131, #12632, #11376, #11187
PR Close #18284
2017-08-22 14:30:59 -04:00
|
|
|
fi
|
2017-03-02 16:54:35 -05:00
|
|
|
else
|
|
|
|
echo "====== Copy ${PACKAGE} node tool"
|
|
|
|
rsync -a ${OUT_DIR}/ ${NPM_DIR}
|
2017-02-22 18:14:49 -05:00
|
|
|
fi
|
2016-04-28 20:50:03 -04:00
|
|
|
|
2017-04-19 22:28:21 -04:00
|
|
|
echo "====== Copy ${PACKAGE} package.json and .externs.js files"
|
2017-03-02 16:54:35 -05:00
|
|
|
rsync -am --include="package.json" --include="*/" --exclude=* ${SRC_DIR}/ ${NPM_DIR}/
|
2017-04-19 22:28:21 -04:00
|
|
|
rsync -am --include="*.externs.js" --include="*/" --exclude=* ${SRC_DIR}/ ${NPM_DIR}/
|
2016-12-02 17:34:16 -05:00
|
|
|
|
2018-02-27 18:04:35 -05:00
|
|
|
# Replace the NG_UPDATE_PACKAGE_GROUP value with the JSON array of packages.
|
2018-03-01 17:31:10 -05:00
|
|
|
perl -p -i -e "s/\"NG_UPDATE_PACKAGE_GROUP\"/${NG_UPDATE_PACKAGE_GROUP}/g" ${NPM_DIR}/package.json < /dev/null
|
2018-02-27 18:04:35 -05:00
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
cp ${ROOT_DIR}/README.md ${NPM_DIR}/
|
2016-09-13 12:49:23 -04:00
|
|
|
fi
|
|
|
|
|
2016-05-20 12:08:39 -04:00
|
|
|
|
2017-03-02 16:54:35 -05:00
|
|
|
if [[ -d ${NPM_DIR} ]]; then
|
2017-08-21 11:23:47 -04:00
|
|
|
updateVersionReferences ${NPM_DIR}
|
2016-05-03 16:43:35 -04:00
|
|
|
fi
|
2017-01-12 20:35:02 -05:00
|
|
|
|
2017-03-02 03:22:24 -05:00
|
|
|
travisFoldEnd "build package: ${PACKAGE}"
|
2016-04-28 20:50:03 -04:00
|
|
|
done
|
2016-09-07 19:04:33 -04:00
|
|
|
|
2017-01-27 20:39:48 -05:00
|
|
|
if [[ ${BUILD_EXAMPLES} == true ]]; then
|
2017-03-15 16:26:09 -04:00
|
|
|
travisFoldStart "build examples" "no-xtrace"
|
2017-03-02 16:54:35 -05:00
|
|
|
echo "====== Building examples: ./packages/examples/build.sh ====="
|
|
|
|
./packages/examples/build.sh
|
2017-03-02 03:22:24 -05:00
|
|
|
travisFoldEnd "build examples"
|
2017-01-27 20:39:48 -05:00
|
|
|
fi
|
2016-11-18 12:24:57 -05:00
|
|
|
|
|
|
|
if [[ ${REMOVE_BENCHPRESS} == true ]]; then
|
2017-03-15 16:26:09 -04:00
|
|
|
travisFoldStart "remove benchpress" "no-xtrace"
|
2017-03-02 03:22:24 -05:00
|
|
|
echo ""
|
|
|
|
echo "==== Removing benchpress from publication"
|
|
|
|
rm -r dist/packages-dist/benchpress
|
|
|
|
travisFoldEnd "remove benchpress"
|
2016-11-18 12:24:57 -05:00
|
|
|
fi
|
2017-03-02 03:22:24 -05:00
|
|
|
|
|
|
|
|
|
|
|
# Print return arrows as a log separator
|
|
|
|
travisFoldReturnArrows
|