From e7742e462fb5d7fb764fbdef857a22745ca9b3d9 Mon Sep 17 00:00:00 2001 From: jahorton Date: Wed, 29 Apr 2020 14:28:30 +0700 Subject: [PATCH] change(web/engine): addresses most of PR review --- common/core/web/input-processor/.gitignore | 6 +++--- common/core/web/input-processor/src/build.sh | 15 ++++++++------- common/core/web/keyboard-processor/.gitignore | 6 +++--- common/core/web/keyboard-processor/src/build.sh | 9 +++++---- common/predictive-text/build.sh | 15 ++++++++------- web/source/build.sh | 2 +- 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/common/core/web/input-processor/.gitignore b/common/core/web/input-processor/.gitignore index a9e0c25514..c613a78f7d 100644 --- a/common/core/web/input-processor/.gitignore +++ b/common/core/web/input-processor/.gitignore @@ -13,6 +13,6 @@ dist/ node_modules/ unit_tests/modernizr.js source/environment.inc.ts -**/.idea/**/*.xml -**/*.iml -**/*.kpj.user \ No newline at end of file +.idea/**/*.xml +*.iml +*.kpj.user \ No newline at end of file diff --git a/common/core/web/input-processor/src/build.sh b/common/core/web/input-processor/src/build.sh index 4e29b1672a..56110a58b7 100755 --- a/common/core/web/input-processor/src/build.sh +++ b/common/core/web/input-processor/src/build.sh @@ -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 diff --git a/common/core/web/keyboard-processor/.gitignore b/common/core/web/keyboard-processor/.gitignore index a9e0c25514..c613a78f7d 100644 --- a/common/core/web/keyboard-processor/.gitignore +++ b/common/core/web/keyboard-processor/.gitignore @@ -13,6 +13,6 @@ dist/ node_modules/ unit_tests/modernizr.js source/environment.inc.ts -**/.idea/**/*.xml -**/*.iml -**/*.kpj.user \ No newline at end of file +.idea/**/*.xml +*.iml +*.kpj.user \ No newline at end of file diff --git a/common/core/web/keyboard-processor/src/build.sh b/common/core/web/keyboard-processor/src/build.sh index 75373ee68e..750c856f49 100755 --- a/common/core/web/keyboard-processor/src/build.sh +++ b/common/core/web/keyboard-processor/src/build.sh @@ -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 ;; diff --git a/common/predictive-text/build.sh b/common/predictive-text/build.sh index a54a0cc25b..567f87b622 100755 --- a/common/predictive-text/build.sh +++ b/common/predictive-text/build.sh @@ -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) diff --git a/web/source/build.sh b/web/source/build.sh index 1c91f44683..1c41984a41 100755 --- a/web/source/build.sh +++ b/web/source/build.sh @@ -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