From 6553bd6233fcd2320166fe71e5c85a3aadd241fa Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Tue, 10 Sep 2024 18:53:20 +0200 Subject: [PATCH 1/2] =?UTF-8?q?refactor(web):=20move=20`common/web/es-bund?= =?UTF-8?q?ling`=20=E2=86=92=20`common/tools/es-bundling`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: #12385 --- .gitignore | 1 + common/{web => tools}/es-bundling/README.md | 0 common/{web => tools}/es-bundling/build.sh | 2 +- common/{web => tools}/es-bundling/src/classTreeshaker.mts | 0 common/{web => tools}/es-bundling/src/common-bundle.mts | 0 common/{web => tools}/es-bundling/src/configuration.mts | 0 common/{web => tools}/es-bundling/src/index.mts | 0 common/{web => tools}/es-bundling/src/tslibTreeshaking.mts | 0 common/{web => tools}/es-bundling/tsconfig.json | 0 common/web/sentry-manager/build.sh | 2 +- web/build.sh | 2 +- web/common.inc.sh | 2 +- web/src/app/webview/map-polyfill-bundler.js | 2 +- web/src/engine/common/web-utils/build.sh | 4 ++-- web/src/engine/interfaces/build.sh | 2 +- web/src/engine/keyboard-storage/build.sh | 2 +- web/src/engine/keyboard/build.sh | 2 +- web/src/engine/osk/gesture-processor/build.sh | 4 ++-- web/src/engine/osk/gesture-processor/src/tools/build.sh | 2 +- web/src/engine/predictive-text/templates/build.sh | 2 +- web/src/engine/predictive-text/worker-main/build.sh | 4 ++-- web/src/engine/predictive-text/worker-thread/build.sh | 4 ++-- 22 files changed, 19 insertions(+), 18 deletions(-) rename common/{web => tools}/es-bundling/README.md (100%) rename common/{web => tools}/es-bundling/build.sh (92%) rename common/{web => tools}/es-bundling/src/classTreeshaker.mts (100%) rename common/{web => tools}/es-bundling/src/common-bundle.mts (100%) rename common/{web => tools}/es-bundling/src/configuration.mts (100%) rename common/{web => tools}/es-bundling/src/index.mts (100%) rename common/{web => tools}/es-bundling/src/tslibTreeshaking.mts (100%) rename common/{web => tools}/es-bundling/tsconfig.json (100%) diff --git a/.gitignore b/.gitignore index 8534d172a9..94f817b508 100644 --- a/.gitignore +++ b/.gitignore @@ -184,3 +184,4 @@ lcov.info /keyman*.changes /keyman*.tar.?z +build/ diff --git a/common/web/es-bundling/README.md b/common/tools/es-bundling/README.md similarity index 100% rename from common/web/es-bundling/README.md rename to common/tools/es-bundling/README.md diff --git a/common/web/es-bundling/build.sh b/common/tools/es-bundling/build.sh similarity index 92% rename from common/web/es-bundling/build.sh rename to common/tools/es-bundling/build.sh index 768f41fa2f..225814d018 100755 --- a/common/web/es-bundling/build.sh +++ b/common/tools/es-bundling/build.sh @@ -17,7 +17,7 @@ builder_describe "Builds KMW's esbuild-oriented common configuration & tooling" builder_describe_outputs \ configure /node_modules \ - build /common/web/es-bundling/build/index.mjs + build /common/tools/es-bundling/build/index.mjs builder_parse "$@" diff --git a/common/web/es-bundling/src/classTreeshaker.mts b/common/tools/es-bundling/src/classTreeshaker.mts similarity index 100% rename from common/web/es-bundling/src/classTreeshaker.mts rename to common/tools/es-bundling/src/classTreeshaker.mts diff --git a/common/web/es-bundling/src/common-bundle.mts b/common/tools/es-bundling/src/common-bundle.mts similarity index 100% rename from common/web/es-bundling/src/common-bundle.mts rename to common/tools/es-bundling/src/common-bundle.mts diff --git a/common/web/es-bundling/src/configuration.mts b/common/tools/es-bundling/src/configuration.mts similarity index 100% rename from common/web/es-bundling/src/configuration.mts rename to common/tools/es-bundling/src/configuration.mts diff --git a/common/web/es-bundling/src/index.mts b/common/tools/es-bundling/src/index.mts similarity index 100% rename from common/web/es-bundling/src/index.mts rename to common/tools/es-bundling/src/index.mts diff --git a/common/web/es-bundling/src/tslibTreeshaking.mts b/common/tools/es-bundling/src/tslibTreeshaking.mts similarity index 100% rename from common/web/es-bundling/src/tslibTreeshaking.mts rename to common/tools/es-bundling/src/tslibTreeshaking.mts diff --git a/common/web/es-bundling/tsconfig.json b/common/tools/es-bundling/tsconfig.json similarity index 100% rename from common/web/es-bundling/tsconfig.json rename to common/tools/es-bundling/tsconfig.json diff --git a/common/web/sentry-manager/build.sh b/common/web/sentry-manager/build.sh index b2541eb769..6a68f8ceff 100755 --- a/common/web/sentry-manager/build.sh +++ b/common/web/sentry-manager/build.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" -BUNDLE_CMD="node $KEYMAN_ROOT/common/web/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node $KEYMAN_ROOT/common/tools/es-bundling/build/common-bundle.mjs" builder_describe "Builds the Sentry-reporting module used with Keyman Engine for Web" \ "@/common/web/keyman-version" \ diff --git a/web/build.sh b/web/build.sh index 445c4b2e63..63c9d00170 100755 --- a/web/build.sh +++ b/web/build.sh @@ -71,7 +71,7 @@ builder_describe_outputs \ build:tools "/web/build/tools/building/sourcemap-root/index.js" \ build:test-pages "/web/build/test-resources/sentry-manager.js" -BUNDLE_CMD="node ${KEYMAN_ROOT}/common/web/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node ${KEYMAN_ROOT}/common/tools/es-bundling/build/common-bundle.mjs" #### Build action definitions #### diff --git a/web/common.inc.sh b/web/common.inc.sh index 8edfb9f4fa..e5e386a4bd 100644 --- a/web/common.inc.sh +++ b/web/common.inc.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -BUNDLE_CMD="node $KEYMAN_ROOT/common/web/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node $KEYMAN_ROOT/common/tools/es-bundling/build/common-bundle.mjs" # Compiles all build products corresponding to the specified target. # This should be called from the working directory of a child project's diff --git a/web/src/app/webview/map-polyfill-bundler.js b/web/src/app/webview/map-polyfill-bundler.js index 466aaa2125..257f897e70 100644 --- a/web/src/app/webview/map-polyfill-bundler.js +++ b/web/src/app/webview/map-polyfill-bundler.js @@ -6,7 +6,7 @@ */ import esbuild from 'esbuild'; -import { iifeConfiguration, prepareTslibTreeshaking } from '../../../../common/web/es-bundling/build/index.mjs'; +import { iifeConfiguration, prepareTslibTreeshaking } from '../../../../common/tools/es-bundling/build/index.mjs'; const commonConfig = { ...iifeConfiguration, diff --git a/web/src/engine/common/web-utils/build.sh b/web/src/engine/common/web-utils/build.sh index 634642f4db..d39c70544a 100755 --- a/web/src/engine/common/web-utils/build.sh +++ b/web/src/engine/common/web-utils/build.sh @@ -14,14 +14,14 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/common/web-utils BUILD_DIR="/web/src/engine/common/web-utils/build" -BUNDLE_CMD="node $KEYMAN_ROOT/common/web/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node $KEYMAN_ROOT/common/tools/es-bundling/build/common-bundle.mjs" ################################ Main script ################################ builder_describe \ "Compiles the web-oriented utility function module." \ "@/common/web/keyman-version" \ - "@/common/web/es-bundling" \ + "@/common/tools/es-bundling" \ clean configure build test \ "--ci For use with action ${BUILDER_TERM_START}test${BUILDER_TERM_END} - emits CI-friendly test reports" diff --git a/web/src/engine/interfaces/build.sh b/web/src/engine/interfaces/build.sh index 568bd7940d..28d488ac9d 100755 --- a/web/src/engine/interfaces/build.sh +++ b/web/src/engine/interfaces/build.sh @@ -13,7 +13,7 @@ SUBPROJECT_NAME=engine/interfaces # ################################ Main script ################################ builder_describe "Builds configuration subclasses used by the Keyman Engine for Web (KMW)." \ - "@/common/web/es-bundling" \ + "@/common/tools/es-bundling" \ "@/web/src/engine/keyboard" \ "@/web/src/engine/js-processor" \ "clean" \ diff --git a/web/src/engine/keyboard-storage/build.sh b/web/src/engine/keyboard-storage/build.sh index 33873355ff..cb6ef8960a 100755 --- a/web/src/engine/keyboard-storage/build.sh +++ b/web/src/engine/keyboard-storage/build.sh @@ -13,7 +13,7 @@ SUBPROJECT_NAME=engine/keyboard-storage # ################################ Main script ################################ builder_describe "Builds Keyman Engine modules for keyboard cloud-querying & caching + model caching." \ - "@/common/web/es-bundling" \ + "@/common/tools/es-bundling" \ "clean" \ "configure" \ "build" \ diff --git a/web/src/engine/keyboard/build.sh b/web/src/engine/keyboard/build.sh index 524375d87b..e59915456f 100755 --- a/web/src/engine/keyboard/build.sh +++ b/web/src/engine/keyboard/build.sh @@ -19,7 +19,7 @@ builder_describe \ "Compiles the web-oriented utility function module." \ "@/web/src/tools/testing/recorder-core test" \ "@/common/web/keyman-version" \ - "@/common/web/es-bundling" \ + "@/common/tools/es-bundling" \ "@/common/web/types" \ "@/web/src/engine/common/web-utils" \ configure \ diff --git a/web/src/engine/osk/gesture-processor/build.sh b/web/src/engine/osk/gesture-processor/build.sh index dc2981a79d..e8c46346ad 100755 --- a/web/src/engine/osk/gesture-processor/build.sh +++ b/web/src/engine/osk/gesture-processor/build.sh @@ -11,14 +11,14 @@ SUBPROJECT_NAME=engine/osk/gesture-processor . "${KEYMAN_ROOT}/web/common.inc.sh" . "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" -BUNDLE_CMD="node $KEYMAN_ROOT/common/web/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node $KEYMAN_ROOT/common/tools/es-bundling/build/common-bundle.mjs" BUILD_DIR="/web/src/engine/osk/gesture-processor/build" ################################ Main script ################################ builder_describe "Builds the gesture-recognition model for Web-based on-screen keyboards" \ - "@/common/web/es-bundling build" \ + "@/common/tools/es-bundling build" \ "@/web/src/engine/common/web-utils build" \ "clean" \ "configure" \ diff --git a/web/src/engine/osk/gesture-processor/src/tools/build.sh b/web/src/engine/osk/gesture-processor/src/tools/build.sh index 1813ab62a8..51929e069d 100755 --- a/web/src/engine/osk/gesture-processor/src/tools/build.sh +++ b/web/src/engine/osk/gesture-processor/src/tools/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "$KEYMAN_ROOT/web/common.inc.sh" . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" -BUNDLE_CMD="node $KEYMAN_ROOT/common/web/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node $KEYMAN_ROOT/common/tools/es-bundling/build/common-bundle.mjs" BASE_DIR="/web/src/engine/osk/gesture-processor" BUILD_DIR="${BASE_DIR}/build" diff --git a/web/src/engine/predictive-text/templates/build.sh b/web/src/engine/predictive-text/templates/build.sh index 7f629a6b1e..30b646f4bb 100755 --- a/web/src/engine/predictive-text/templates/build.sh +++ b/web/src/engine/predictive-text/templates/build.sh @@ -14,7 +14,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" builder_describe "Builds the predictive-text model template implementation module" \ "@/common/web/keyman-version" \ - "@/common/web/es-bundling" \ + "@/common/tools/es-bundling" \ "@../wordbreakers" \ "clean" \ "configure" \ diff --git a/web/src/engine/predictive-text/worker-main/build.sh b/web/src/engine/predictive-text/worker-main/build.sh index c9429dab4e..00d26f4392 100755 --- a/web/src/engine/predictive-text/worker-main/build.sh +++ b/web/src/engine/predictive-text/worker-main/build.sh @@ -13,13 +13,13 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" -BUNDLE_CMD="node $KEYMAN_ROOT/common/web/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node $KEYMAN_ROOT/common/tools/es-bundling/build/common-bundle.mjs" ################################ Main script ################################ builder_describe "Builds the lm-layer module" \ "@/common/web/keyman-version" \ - "@/common/web/es-bundling" \ + "@/common/tools/es-bundling" \ "@/common/web/types" \ "@/web/src/engine/predictive-text/worker-thread" \ "clean" \ diff --git a/web/src/engine/predictive-text/worker-thread/build.sh b/web/src/engine/predictive-text/worker-thread/build.sh index 0ddd986630..6e76aa8084 100755 --- a/web/src/engine/predictive-text/worker-thread/build.sh +++ b/web/src/engine/predictive-text/worker-thread/build.sh @@ -17,7 +17,7 @@ WORKER_OUTPUT_FILENAME=build/lib/worker-main.js INTERMEDIATE=./build/intermediate LIB=./build/lib -bundle_cmd="node ${KEYMAN_ROOT}/common/web/es-bundling/build/common-bundle.mjs" +bundle_cmd="node ${KEYMAN_ROOT}/common/tools/es-bundling/build/common-bundle.mjs" SRCMAP_CLEANER="node $KEYMAN_ROOT/web/build/tools/building/sourcemap-root/index.js" @@ -27,7 +27,7 @@ builder_describe \ "Compiles the Language Modeling Layer for common use in predictive text and autocorrective applications." \ "@/web/src/tools/building/sourcemap-root" \ "@/common/web/keyman-version" \ - "@/common/web/es-bundling" \ + "@/common/tools/es-bundling" \ "@../wordbreakers" \ "@../templates/" \ configure clean build test --ci From d4a049f614c6076d8ddd4fdcf564c71f8c3fa697 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 11 Sep 2024 09:37:56 +0200 Subject: [PATCH 2/2] refactor(web): move to `web/src/tools/es-bundling` Addresses code review comments. --- .gitignore | 2 -- common/web/sentry-manager/build.sh | 2 +- web/build.sh | 2 +- web/common.inc.sh | 2 +- web/src/app/webview/map-polyfill-bundler.js | 2 +- web/src/engine/common/web-utils/build.sh | 4 ++-- web/src/engine/interfaces/build.sh | 2 +- web/src/engine/keyboard-storage/build.sh | 2 +- web/src/engine/keyboard/build.sh | 4 ++-- web/src/engine/osk/gesture-processor/build.sh | 4 ++-- web/src/engine/osk/gesture-processor/src/tools/build.sh | 2 +- .../src/tools/unit-test-resources/build-bundler.js | 2 +- web/src/engine/predictive-text/templates/build.sh | 2 +- web/src/engine/predictive-text/worker-main/build.sh | 4 ++-- web/src/engine/predictive-text/worker-thread/build.sh | 6 +++--- {common => web/src}/tools/es-bundling/README.md | 0 {common => web/src}/tools/es-bundling/build.sh | 4 ++-- .../src}/tools/es-bundling/src/classTreeshaker.mts | 0 {common => web/src}/tools/es-bundling/src/common-bundle.mts | 0 {common => web/src}/tools/es-bundling/src/configuration.mts | 0 {common => web/src}/tools/es-bundling/src/index.mts | 0 .../src}/tools/es-bundling/src/tslibTreeshaking.mts | 0 {common => web/src}/tools/es-bundling/tsconfig.json | 2 +- 23 files changed, 23 insertions(+), 25 deletions(-) rename {common => web/src}/tools/es-bundling/README.md (100%) rename {common => web/src}/tools/es-bundling/build.sh (83%) rename {common => web/src}/tools/es-bundling/src/classTreeshaker.mts (100%) rename {common => web/src}/tools/es-bundling/src/common-bundle.mts (100%) rename {common => web/src}/tools/es-bundling/src/configuration.mts (100%) rename {common => web/src}/tools/es-bundling/src/index.mts (100%) rename {common => web/src}/tools/es-bundling/src/tslibTreeshaking.mts (100%) rename {common => web/src}/tools/es-bundling/tsconfig.json (82%) diff --git a/.gitignore b/.gitignore index 94f817b508..772784fdb8 100644 --- a/.gitignore +++ b/.gitignore @@ -183,5 +183,3 @@ lcov.info /keyman*.buildinfo /keyman*.changes /keyman*.tar.?z - -build/ diff --git a/common/web/sentry-manager/build.sh b/common/web/sentry-manager/build.sh index 6a68f8ceff..8dd64db2ed 100755 --- a/common/web/sentry-manager/build.sh +++ b/common/web/sentry-manager/build.sh @@ -10,7 +10,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" -BUNDLE_CMD="node $KEYMAN_ROOT/common/tools/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node $KEYMAN_ROOT/web/src/tools/es-bundling/build/common-bundle.mjs" builder_describe "Builds the Sentry-reporting module used with Keyman Engine for Web" \ "@/common/web/keyman-version" \ diff --git a/web/build.sh b/web/build.sh index 63c9d00170..5f2446a945 100755 --- a/web/build.sh +++ b/web/build.sh @@ -71,7 +71,7 @@ builder_describe_outputs \ build:tools "/web/build/tools/building/sourcemap-root/index.js" \ build:test-pages "/web/build/test-resources/sentry-manager.js" -BUNDLE_CMD="node ${KEYMAN_ROOT}/common/tools/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node ${KEYMAN_ROOT}/web/src/tools/es-bundling/build/common-bundle.mjs" #### Build action definitions #### diff --git a/web/common.inc.sh b/web/common.inc.sh index e5e386a4bd..429c9a9a8d 100644 --- a/web/common.inc.sh +++ b/web/common.inc.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -BUNDLE_CMD="node $KEYMAN_ROOT/common/tools/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node $KEYMAN_ROOT/web/src/tools/es-bundling/build/common-bundle.mjs" # Compiles all build products corresponding to the specified target. # This should be called from the working directory of a child project's diff --git a/web/src/app/webview/map-polyfill-bundler.js b/web/src/app/webview/map-polyfill-bundler.js index 257f897e70..72b7a83243 100644 --- a/web/src/app/webview/map-polyfill-bundler.js +++ b/web/src/app/webview/map-polyfill-bundler.js @@ -6,7 +6,7 @@ */ import esbuild from 'esbuild'; -import { iifeConfiguration, prepareTslibTreeshaking } from '../../../../common/tools/es-bundling/build/index.mjs'; +import { iifeConfiguration, prepareTslibTreeshaking } from '../../tools/es-bundling/build/index.mjs'; const commonConfig = { ...iifeConfiguration, diff --git a/web/src/engine/common/web-utils/build.sh b/web/src/engine/common/web-utils/build.sh index d39c70544a..303bd2664b 100755 --- a/web/src/engine/common/web-utils/build.sh +++ b/web/src/engine/common/web-utils/build.sh @@ -14,14 +14,14 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" SUBPROJECT_NAME=engine/common/web-utils BUILD_DIR="/web/src/engine/common/web-utils/build" -BUNDLE_CMD="node $KEYMAN_ROOT/common/tools/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node $KEYMAN_ROOT/web/src/tools/es-bundling/build/common-bundle.mjs" ################################ Main script ################################ builder_describe \ "Compiles the web-oriented utility function module." \ "@/common/web/keyman-version" \ - "@/common/tools/es-bundling" \ + "@/web/src/tools/es-bundling" \ clean configure build test \ "--ci For use with action ${BUILDER_TERM_START}test${BUILDER_TERM_END} - emits CI-friendly test reports" diff --git a/web/src/engine/interfaces/build.sh b/web/src/engine/interfaces/build.sh index 28d488ac9d..94bb267cbc 100755 --- a/web/src/engine/interfaces/build.sh +++ b/web/src/engine/interfaces/build.sh @@ -13,7 +13,7 @@ SUBPROJECT_NAME=engine/interfaces # ################################ Main script ################################ builder_describe "Builds configuration subclasses used by the Keyman Engine for Web (KMW)." \ - "@/common/tools/es-bundling" \ + "@/web/src/tools/es-bundling" \ "@/web/src/engine/keyboard" \ "@/web/src/engine/js-processor" \ "clean" \ diff --git a/web/src/engine/keyboard-storage/build.sh b/web/src/engine/keyboard-storage/build.sh index cb6ef8960a..b7ffc4d6b3 100755 --- a/web/src/engine/keyboard-storage/build.sh +++ b/web/src/engine/keyboard-storage/build.sh @@ -13,7 +13,7 @@ SUBPROJECT_NAME=engine/keyboard-storage # ################################ Main script ################################ builder_describe "Builds Keyman Engine modules for keyboard cloud-querying & caching + model caching." \ - "@/common/tools/es-bundling" \ + "@/web/src/tools/es-bundling" \ "clean" \ "configure" \ "build" \ diff --git a/web/src/engine/keyboard/build.sh b/web/src/engine/keyboard/build.sh index e59915456f..fd15e59bc1 100755 --- a/web/src/engine/keyboard/build.sh +++ b/web/src/engine/keyboard/build.sh @@ -17,10 +17,10 @@ SUBPROJECT_NAME=engine/keyboard builder_describe \ "Compiles the web-oriented utility function module." \ - "@/web/src/tools/testing/recorder-core test" \ "@/common/web/keyman-version" \ - "@/common/tools/es-bundling" \ "@/common/web/types" \ + "@/web/src/tools/testing/recorder-core test" \ + "@/web/src/tools/es-bundling" \ "@/web/src/engine/common/web-utils" \ configure \ clean \ diff --git a/web/src/engine/osk/gesture-processor/build.sh b/web/src/engine/osk/gesture-processor/build.sh index e8c46346ad..70080b1a7f 100755 --- a/web/src/engine/osk/gesture-processor/build.sh +++ b/web/src/engine/osk/gesture-processor/build.sh @@ -11,14 +11,14 @@ SUBPROJECT_NAME=engine/osk/gesture-processor . "${KEYMAN_ROOT}/web/common.inc.sh" . "${KEYMAN_ROOT}/resources/shellHelperFunctions.sh" -BUNDLE_CMD="node $KEYMAN_ROOT/common/tools/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node $KEYMAN_ROOT/web/src/tools/es-bundling/build/common-bundle.mjs" BUILD_DIR="/web/src/engine/osk/gesture-processor/build" ################################ Main script ################################ builder_describe "Builds the gesture-recognition model for Web-based on-screen keyboards" \ - "@/common/tools/es-bundling build" \ + "@/web/src/tools/es-bundling build" \ "@/web/src/engine/common/web-utils build" \ "clean" \ "configure" \ diff --git a/web/src/engine/osk/gesture-processor/src/tools/build.sh b/web/src/engine/osk/gesture-processor/src/tools/build.sh index 51929e069d..343d90a117 100755 --- a/web/src/engine/osk/gesture-processor/src/tools/build.sh +++ b/web/src/engine/osk/gesture-processor/src/tools/build.sh @@ -9,7 +9,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "$KEYMAN_ROOT/web/common.inc.sh" . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" -BUNDLE_CMD="node $KEYMAN_ROOT/common/tools/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node $KEYMAN_ROOT/web/src/tools/es-bundling/build/common-bundle.mjs" BASE_DIR="/web/src/engine/osk/gesture-processor" BUILD_DIR="${BASE_DIR}/build" diff --git a/web/src/engine/osk/gesture-processor/src/tools/unit-test-resources/build-bundler.js b/web/src/engine/osk/gesture-processor/src/tools/unit-test-resources/build-bundler.js index bd8f07077e..4603b338ad 100644 --- a/web/src/engine/osk/gesture-processor/src/tools/unit-test-resources/build-bundler.js +++ b/web/src/engine/osk/gesture-processor/src/tools/unit-test-resources/build-bundler.js @@ -1,5 +1,5 @@ import esbuild from 'esbuild'; -import { esmConfiguration, bundleObjEntryPoints } from '../../../../es-bundling/build/index.mjs'; +import { esmConfiguration, bundleObjEntryPoints } from '../../../../../../tools/es-bundling/build/index.mjs'; await esbuild.build({ ...esmConfiguration, diff --git a/web/src/engine/predictive-text/templates/build.sh b/web/src/engine/predictive-text/templates/build.sh index 30b646f4bb..e7aaaac124 100755 --- a/web/src/engine/predictive-text/templates/build.sh +++ b/web/src/engine/predictive-text/templates/build.sh @@ -14,7 +14,7 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" builder_describe "Builds the predictive-text model template implementation module" \ "@/common/web/keyman-version" \ - "@/common/tools/es-bundling" \ + "@/web/src/tools/es-bundling" \ "@../wordbreakers" \ "clean" \ "configure" \ diff --git a/web/src/engine/predictive-text/worker-main/build.sh b/web/src/engine/predictive-text/worker-main/build.sh index 00d26f4392..f7b788b6ef 100755 --- a/web/src/engine/predictive-text/worker-main/build.sh +++ b/web/src/engine/predictive-text/worker-main/build.sh @@ -13,14 +13,14 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" -BUNDLE_CMD="node $KEYMAN_ROOT/common/tools/es-bundling/build/common-bundle.mjs" +BUNDLE_CMD="node $KEYMAN_ROOT/web/src/tools/es-bundling/build/common-bundle.mjs" ################################ Main script ################################ builder_describe "Builds the lm-layer module" \ "@/common/web/keyman-version" \ - "@/common/tools/es-bundling" \ "@/common/web/types" \ + "@/web/src/tools/es-bundling" \ "@/web/src/engine/predictive-text/worker-thread" \ "clean" \ "configure" \ diff --git a/web/src/engine/predictive-text/worker-thread/build.sh b/web/src/engine/predictive-text/worker-thread/build.sh index 721e94c6d9..05c7326cd0 100755 --- a/web/src/engine/predictive-text/worker-thread/build.sh +++ b/web/src/engine/predictive-text/worker-thread/build.sh @@ -17,7 +17,7 @@ WORKER_OUTPUT_FILENAME=build/lib/worker-main.js INTERMEDIATE=./build/intermediate LIB=./build/lib -bundle_cmd="node ${KEYMAN_ROOT}/common/tools/es-bundling/build/common-bundle.mjs" +bundle_cmd="node ${KEYMAN_ROOT}/web/src/tools/es-bundling/build/common-bundle.mjs" SRCMAP_CLEANER="node $KEYMAN_ROOT/web/build/tools/building/sourcemap-root/index.js" @@ -25,9 +25,9 @@ SRCMAP_CLEANER="node $KEYMAN_ROOT/web/build/tools/building/sourcemap-root/index. builder_describe \ "Compiles the Language Modeling Layer for common use in predictive text and autocorrective applications." \ - "@/web/src/tools/building/sourcemap-root" \ "@/common/web/keyman-version" \ - "@/common/tools/es-bundling" \ + "@/web/src/tools/building/sourcemap-root" \ + "@/web/src/tools/es-bundling" \ "@../wordbreakers" \ "@../templates" \ configure clean build test --ci diff --git a/common/tools/es-bundling/README.md b/web/src/tools/es-bundling/README.md similarity index 100% rename from common/tools/es-bundling/README.md rename to web/src/tools/es-bundling/README.md diff --git a/common/tools/es-bundling/build.sh b/web/src/tools/es-bundling/build.sh similarity index 83% rename from common/tools/es-bundling/build.sh rename to web/src/tools/es-bundling/build.sh index 225814d018..ec2deee862 100755 --- a/common/tools/es-bundling/build.sh +++ b/web/src/tools/es-bundling/build.sh @@ -3,7 +3,7 @@ ## START STANDARD BUILD SCRIPT INCLUDE # adjust relative paths as necessary THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" -. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" +. "${THIS_SCRIPT%/*}/../../../../resources/build/builder.inc.sh" ## END STANDARD BUILD SCRIPT INCLUDE . "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" @@ -17,7 +17,7 @@ builder_describe "Builds KMW's esbuild-oriented common configuration & tooling" builder_describe_outputs \ configure /node_modules \ - build /common/tools/es-bundling/build/index.mjs + build /web/src/tools/es-bundling/build/index.mjs builder_parse "$@" diff --git a/common/tools/es-bundling/src/classTreeshaker.mts b/web/src/tools/es-bundling/src/classTreeshaker.mts similarity index 100% rename from common/tools/es-bundling/src/classTreeshaker.mts rename to web/src/tools/es-bundling/src/classTreeshaker.mts diff --git a/common/tools/es-bundling/src/common-bundle.mts b/web/src/tools/es-bundling/src/common-bundle.mts similarity index 100% rename from common/tools/es-bundling/src/common-bundle.mts rename to web/src/tools/es-bundling/src/common-bundle.mts diff --git a/common/tools/es-bundling/src/configuration.mts b/web/src/tools/es-bundling/src/configuration.mts similarity index 100% rename from common/tools/es-bundling/src/configuration.mts rename to web/src/tools/es-bundling/src/configuration.mts diff --git a/common/tools/es-bundling/src/index.mts b/web/src/tools/es-bundling/src/index.mts similarity index 100% rename from common/tools/es-bundling/src/index.mts rename to web/src/tools/es-bundling/src/index.mts diff --git a/common/tools/es-bundling/src/tslibTreeshaking.mts b/web/src/tools/es-bundling/src/tslibTreeshaking.mts similarity index 100% rename from common/tools/es-bundling/src/tslibTreeshaking.mts rename to web/src/tools/es-bundling/src/tslibTreeshaking.mts diff --git a/common/tools/es-bundling/tsconfig.json b/web/src/tools/es-bundling/tsconfig.json similarity index 82% rename from common/tools/es-bundling/tsconfig.json rename to web/src/tools/es-bundling/tsconfig.json index 54c922e1bd..1c317aabec 100644 --- a/common/tools/es-bundling/tsconfig.json +++ b/web/src/tools/es-bundling/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../../tsconfig.base.json", "compilerOptions": { "allowSyntheticDefaultImports": true, "baseUrl": "./",