change(web/engine): addresses most of PR review

This commit is contained in:
jahorton 2020-04-29 14:28:30 +07:00
parent ac3661b2d4
commit e7742e462f
6 changed files with 28 additions and 25 deletions

View file

@ -13,6 +13,6 @@ dist/
node_modules/
unit_tests/modernizr.js
source/environment.inc.ts
**/.idea/**/*.xml
**/*.iml
**/*.kpj.user
.idea/**/*.xml
*.iml
*.kpj.user

View file

@ -14,11 +14,11 @@ THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BA
cd "$(dirname "$THIS_SCRIPT")"
display_usage ( ) {
echo "build.sh [-no-lerna | -test"
echo "build.sh [-skip-package-install | -S] [-test]"
echo
echo " -test to compile for testing without re-fetching external dependencies"
echo " or recompiling the lm-layer module."
echo " -no-lerna skips the `lerna bootstrap` dependency check."
echo " -test to compile for testing without re-fetching external dependencies"
echo " or recompiling the lm-layer module."
echo " -skip-package-install (or -S) skips the `lerna bootstrap` dependency check."
echo ""
echo " If more than one target is specified, the last one will take precedence."
exit 1
@ -42,7 +42,8 @@ while [[ $# -gt 0 ]] ; do
BUILD_LMLAYER=false
FETCH_DEPS=false
;;
-no-lerna)
-skip-package-install)
-S)
set_default_vars
FETCH_DEPS=false
;;
@ -58,7 +59,7 @@ if [ $FETCH_DEPS = true ]; then
fi
if [ $BUILD_LMLAYER = true ]; then
FLAGS="-no-lerna"
FLAGS="-skip-package-install"
# Ensure that the LMLayer compiles properly, readying the build product for comsumption by KMW.
cd ../../../../predictive-text/
@ -72,7 +73,7 @@ if [ $BUILD_LMLAYER = true ]; then
fi
if [ $BUILD_CORE = true ]; then
FLAGS="-no-lerna"
FLAGS="-skip-package-install"
# Ensure that the KeyboardProcessor module compiles properly.
cd ../../keyboard-processor/src

View file

@ -13,6 +13,6 @@ dist/
node_modules/
unit_tests/modernizr.js
source/environment.inc.ts
**/.idea/**/*.xml
**/*.iml
**/*.kpj.user
.idea/**/*.xml
*.iml
*.kpj.user

View file

@ -14,10 +14,10 @@ THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BA
cd "$(dirname "$THIS_SCRIPT")"
display_usage ( ) {
echo "build.sh [-no-lerna | -test"
echo "build.sh [-skip-package-install | -S] [-test]"
echo
echo " -no-lerna skips the `lerna bootstrap` dependency check."
echo " Intended for use when this script is called by another build script."
echo " -skip-package-install (or -S) skips the `lerna bootstrap` dependency check."
echo " Intended for use when this script is called by another build script."
echo ""
echo " If more than one target is specified, the last one will take precedence."
exit 1
@ -34,7 +34,8 @@ set_default_vars
while [[ $# -gt 0 ]] ; do
key="$1"
case $key in
-no-lerna)
-skip-package-install)
-S)
set_default_vars
FETCH_DEPS=false
;;

View file

@ -107,14 +107,14 @@ clean ( ) {
}
display_usage ( ) {
echo "Usage: $0 [-clean] [-no-lerna] [-test | -tdd]"
echo "Usage: $0 [-clean] [-skip-package-install | -S] [-test | -tdd]"
echo " $0 -help"
echo
echo " -clean to erase pre-existing build products before a re-build"
echo " -help displays this screen and exits"
echo " -no-lerna skips dependency updates"
echo " -tdd skips dependency updates, builds, then runs unit tests only"
echo " -test runs unit and integration tests after building"
echo " -clean to erase pre-existing build products before a re-build"
echo " -help displays this screen and exits"
echo " -skip-package-install (or -S) skips dependency updates"
echo " -tdd skips dependency updates, builds, then runs unit tests only"
echo " -test runs unit and integration tests after building"
}
# Creates embedded_worker.js. Must be run after the worker is built for the
@ -172,7 +172,8 @@ while [[ $# -gt 0 ]] ; do
display_usage
exit
;;
-no-lerna)
-skip-package-install)
-S)
fetch_deps=false
;;
-test)

View file

@ -323,7 +323,7 @@ if [ $DO_MINIFY = true ]; then
fi
if [ $BUILD_CORE = true ]; then
CORE_FLAGS="-no-lerna"
CORE_FLAGS="-skip-package-install"
if [ $BUILD_LMLAYER = false ]; then
CORE_FLAGS="$CORE_FLAGS -test"
fi