mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
refactor(web): merge engine modules
In order to simplify and make the build significantly faster, as well as reduce duplication of configuration files, we have merged most of the engine modules into a single module, engine: * engine/attachment * engine/core-processor * engine/dom-utils * engine/element-wrappers * engine/events * engine/interfaces * engine/js-processor * engine/keyboard * engine/keyboard-storage * engine/main * engine/osk A few test-specific files have been moved from engine to test, such as nodeCloudRequester.ts and nodeKeyboardLoader.ts.
This commit is contained in:
parent
8f08bd2e8a
commit
9d2c23e0d3
323 changed files with 421 additions and 1353 deletions
19
package-lock.json
generated
19
package-lock.json
generated
|
|
@ -31,7 +31,6 @@
|
|||
"common/tools/sourcemap-path-remapper",
|
||||
"common/tools/hextobin",
|
||||
"web",
|
||||
"web/src/engine/osk/gesture-processor",
|
||||
"web/src/engine/predictive-text/*"
|
||||
],
|
||||
"dependencies": {
|
||||
|
|
@ -1678,10 +1677,6 @@
|
|||
"resolved": "developer/src/common/web/utils",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@keymanapp/gesture-recognizer": {
|
||||
"resolved": "web/src/engine/osk/gesture-processor",
|
||||
"link": true
|
||||
},
|
||||
"node_modules/@keymanapp/hextobin": {
|
||||
"resolved": "common/tools/hextobin",
|
||||
"link": true
|
||||
|
|
@ -14186,6 +14181,7 @@
|
|||
"c8": "^7.12.0",
|
||||
"express": "^4.19.2",
|
||||
"jsdom": "^23.0.1",
|
||||
"promise-status-async": "^1.2.10",
|
||||
"tsx": "^4.19.0"
|
||||
}
|
||||
},
|
||||
|
|
@ -14228,6 +14224,7 @@
|
|||
},
|
||||
"web/src/engine/osk/gesture-processor": {
|
||||
"name": "@keymanapp/gesture-recognizer",
|
||||
"extraneous": true,
|
||||
"dependencies": {
|
||||
"@keymanapp/web-utils": "*",
|
||||
"eventemitter3": "^5.0.0"
|
||||
|
|
@ -14323,6 +14320,18 @@
|
|||
"typescript": "^5.4.5"
|
||||
}
|
||||
},
|
||||
"web/src/engine/src/gesture-processor": {
|
||||
"extraneous": true,
|
||||
"dependencies": {
|
||||
"@keymanapp/web-utils": "*",
|
||||
"eventemitter3": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@keymanapp/resources-gosh": "*",
|
||||
"promise-status-async": "^1.2.10",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
},
|
||||
"web/src/tools/testing/recorder-core": {
|
||||
"name": "@keymanapp/recorder-core",
|
||||
"license": "MIT",
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@
|
|||
"common/tools/sourcemap-path-remapper",
|
||||
"common/tools/hextobin",
|
||||
"web",
|
||||
"web/src/engine/osk/gesture-processor",
|
||||
"web/src/engine/predictive-text/*"
|
||||
],
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@
|
|||
{ "path": "./web/src/engine/predictive-text/wordbreakers" },
|
||||
{ "path": "./web/src/engine/predictive-text/worker-main/tsconfig.all.json" },
|
||||
{ "path": "./web/src/engine/predictive-text/worker-thread" },
|
||||
{ "path": "./web/src/engine/osk/gesture-processor/tsconfig.json" },
|
||||
{ "path": "./web/src/engine/osk/gesture-processor/src/tools/unit-test-resources/tsconfig.json" },
|
||||
{ "path": "./web/src/tools/testing/gesture-processor/unit-test-resources" },
|
||||
{ "path": "./web/src/engine/sentry-manager/src" },
|
||||
|
||||
{ "path": "./web/src/tools/testing/recorder" },
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/mocharc.json",
|
||||
"require": "tsx"
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ graph TD;
|
|||
LMWorker-->Wordbreakers;
|
||||
LMLayer["@keymanapp/lexical-model-layer<br>(/web/src/engine/predictive-text/worker-main)"];
|
||||
LMLayer-->LMWorker;
|
||||
Gestures["@keymanapp/gesture-recognizer<br>(/web/src/engine/osk/gesture-recognizer)"];
|
||||
Gestures["/web/src/engine/gesture-processor"];
|
||||
Gestures-->WebUtils;
|
||||
|
||||
subgraph PredText["PredText: WebWorker + its interface"]
|
||||
|
|
|
|||
49
web/build.sh
49
web/build.sh
|
|
@ -26,18 +26,8 @@ builder_describe "Builds engine modules for Keyman Engine for Web (KMW)." \
|
|||
":app/browser The form of Keyman Engine for Web for use on websites" \
|
||||
":app/webview A puppetable version of KMW designed for use in a host app's WebView" \
|
||||
":app/ui Builds KMW's desktop form-factor keyboard-selection UI modules" \
|
||||
":engine/attachment Subset used for detecting valid page contexts for use in text editing " \
|
||||
":engine/core-processor Keyman Core WASM integration" \
|
||||
":engine/common/web-utils Low-level, headless utility methods and classes used across multiple modules" \
|
||||
":engine/dom-utils A common subset of function used for DOM calculations, layout, etc" \
|
||||
":engine/events Specialized classes utilized to support KMW API events" \
|
||||
":engine/element-wrappers Subset used to integrate with website elements" \
|
||||
":engine/interfaces Subset used to configure KMW" \
|
||||
":engine/js-processor Build JS processor for KMW" \
|
||||
":engine/keyboard Builds KMW's keyboard-loading and caching code" \
|
||||
":engine/keyboard-storage Subset used to collate keyboards and request them from the cloud" \
|
||||
":engine/main Builds all common code used by KMW's app/-level targets" \
|
||||
":engine/osk Builds the Web OSK module" \
|
||||
":engine Keyman Engine for Web" \
|
||||
":engine/common/web-utils Shared utils" \
|
||||
":engine/predictive-text Builds KMW's predictive text module" \
|
||||
":help Online documentation" \
|
||||
":samples Builds all needed resources for the KMW sample-page set" \
|
||||
|
|
@ -123,10 +113,12 @@ build_action() {
|
|||
# errors when compiling against it with current tsc versions.
|
||||
rm -f "${KEYMAN_ROOT}/node_modules/promise-status-async/lib/index.d.ts"
|
||||
|
||||
tsc --project "${KEYMAN_ROOT}/web/src/test/auto/tsconfig.json"
|
||||
tsc -b "${KEYMAN_ROOT}/web/src/test/auto/tsconfig.json"
|
||||
|
||||
builder_echo "Copying some files"
|
||||
|
||||
mkdir -p "${KEYMAN_ROOT}/web/build/test/dom/cases/core-processor/import/core/"
|
||||
cp "${KEYMAN_ROOT}/web/src/engine/core-processor/src/import/core/keymancore.d.ts" "${KEYMAN_ROOT}/web/build/test/dom/cases/core-processor/import/core/"
|
||||
cp "${KEYMAN_ROOT}/web/src/engine/src/core-processor/import/core/keymancore.d.ts" "${KEYMAN_ROOT}/web/build/test/dom/cases/core-processor/import/core/"
|
||||
|
||||
for dir in \
|
||||
"${KEYMAN_ROOT}/web/build/test/dom/cases"/*/ \
|
||||
|
|
@ -164,33 +156,12 @@ coverage_action() {
|
|||
rm -rf build/coverage/tmp
|
||||
}
|
||||
|
||||
builder_run_child_actions build:tools
|
||||
|
||||
builder_run_child_actions build:engine/common/web-utils
|
||||
builder_run_child_actions build:engine/dom-utils
|
||||
|
||||
builder_run_child_actions build:engine/keyboard
|
||||
builder_run_child_actions build:engine/js-processor
|
||||
builder_run_child_actions build:engine/element-wrappers
|
||||
builder_run_child_actions build:engine/events
|
||||
builder_run_child_actions build:engine/interfaces
|
||||
|
||||
# Uses engine/dom-utils and engine/interfaces
|
||||
builder_run_child_actions build:engine/osk
|
||||
|
||||
# Uses engine/element-wrappers
|
||||
builder_run_child_actions build:engine/attachment
|
||||
|
||||
# Uses engine/interfaces (due to resource-path config interface)
|
||||
builder_run_child_actions build:engine/keyboard-storage
|
||||
|
||||
# Builds the predictive-text components
|
||||
builder_run_child_actions build:engine
|
||||
builder_run_child_actions build:engine/predictive-text
|
||||
|
||||
# Uses engine/interfaces, engine/keyboard-storage, engine/predictive-text, & engine/osk
|
||||
builder_run_child_actions build:engine/core-processor
|
||||
|
||||
# Uses engine/interfaces, engine/keyboard-storage, & engine/osk
|
||||
builder_run_child_actions build:engine/main
|
||||
|
||||
# Uses all but engine/element-wrappers and engine/attachment
|
||||
builder_run_child_actions build:app/webview
|
||||
|
||||
|
|
@ -203,8 +174,6 @@ builder_run_child_actions build:app/ui
|
|||
# Needs both app/browser and app/ui.
|
||||
builder_run_child_actions build:samples
|
||||
|
||||
builder_run_child_actions build:tools
|
||||
|
||||
# Some test pages refer to KMW tools.
|
||||
builder_run_child_actions build:test-pages
|
||||
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ function test-headless() {
|
|||
TEST_OPTS+=(--extension "${TEST_EXTENSIONS}")
|
||||
fi
|
||||
|
||||
builder_echo '> ' mocha --recursive "${TEST_BASE}${TEST_FOLDER}" "${TEST_OPTS[@]}"
|
||||
if [[ -e .c8rc.json ]]; then
|
||||
c8 mocha --recursive "${TEST_BASE}${TEST_FOLDER}" "${TEST_OPTS[@]}"
|
||||
else
|
||||
|
|
|
|||
100
web/package.json
100
web/package.json
|
|
@ -8,84 +8,65 @@
|
|||
"import": "./build/app/browser/obj/test-index.js"
|
||||
},
|
||||
"./engine/attachment": {
|
||||
"es6-bundling": "./src/engine/attachment/src/index.ts",
|
||||
"types": "./build/engine/attachment/obj/index.d.ts",
|
||||
"import": "./build/engine/attachment/obj/index.js"
|
||||
"es6-bundling": "./src/engine/src/attachment/index.ts",
|
||||
"types": "./build/engine/obj/attachment/index.d.ts",
|
||||
"import": "./build/engine/obj/attachment/index.js"
|
||||
},
|
||||
"./engine/core-processor": {
|
||||
"es6-bundling": "./src/engine/core-processor/src/index.ts",
|
||||
"types": "./build/engine/core-processor/obj/index.d.ts",
|
||||
"import": "./build/engine/core-processor/obj/index.js"
|
||||
"es6-bundling": "./src/engine/src/core-processor/index.ts",
|
||||
"types": "./build/engine/obj/core-processor/index.d.ts",
|
||||
"import": "./build/engine/obj/core-processor/index.js"
|
||||
},
|
||||
"./engine/dom-utils": {
|
||||
"es6-bundling": "./src/engine/dom-utils/src/index.ts",
|
||||
"types": "./build/engine/dom-utils/obj/index.d.ts",
|
||||
"import": "./build/engine/dom-utils/obj/index.js"
|
||||
"es6-bundling": "./src/engine/src/dom-utils/index.ts",
|
||||
"types": "./build/engine/obj/dom-utils/index.d.ts",
|
||||
"import": "./build/engine/obj/dom-utils/index.js"
|
||||
},
|
||||
"./engine/element-wrappers": {
|
||||
"es6-bundling": "./src/engine/element-wrappers/src/index.ts",
|
||||
"types": "./build/engine/element-wrappers/obj/index.d.ts",
|
||||
"import": "./build/engine/element-wrappers/obj/index.js"
|
||||
"es6-bundling": "./src/engine/src/element-wrappers/index.ts",
|
||||
"types": "./build/engine/obj/element-wrappers/index.d.ts",
|
||||
"import": "./build/engine/obj/element-wrappers/index.js"
|
||||
},
|
||||
"./engine/events": {
|
||||
"es6-bundling": "./src/engine/events/src/index.ts",
|
||||
"types": "./build/engine/events/obj/index.d.ts",
|
||||
"import": "./build/engine/events/obj/index.js"
|
||||
"es6-bundling": "./src/engine/src/events/index.ts",
|
||||
"types": "./build/engine/obj/events/index.d.ts",
|
||||
"import": "./build/engine/obj/events/index.js"
|
||||
},
|
||||
"./engine/gesture-processor": {
|
||||
"es6-bundling": "./src/engine/src/gesture-processor/index.ts",
|
||||
"types": "./build/engine/obj/gesture-processor/index.d.ts",
|
||||
"import": "./build/engine/obj/gesture-processor/index.js"
|
||||
},
|
||||
"./engine/interfaces": {
|
||||
"es6-bundling": "./src/engine/interfaces/src/index.ts",
|
||||
"types": "./build/engine/interfaces/obj/index.d.ts",
|
||||
"import": "./build/engine/interfaces/obj/index.js"
|
||||
"es6-bundling": "./src/engine/src/interfaces/index.ts",
|
||||
"types": "./build/engine/obj/interfaces/index.d.ts",
|
||||
"import": "./build/engine/obj/interfaces/index.js"
|
||||
},
|
||||
"./engine/js-processor": {
|
||||
"es6-bundling": "./src/engine/js-processor/src/index.ts",
|
||||
"types": "./build/engine/js-processor/obj/index.d.ts",
|
||||
"import": "./build/engine/js-processor/obj/index.js"
|
||||
"es6-bundling": "./src/engine/src/js-processor/index.ts",
|
||||
"types": "./build/engine/obj/js-processor/index.d.ts",
|
||||
"import": "./build/engine/obj/js-processor/index.js"
|
||||
},
|
||||
"./engine/keyboard": {
|
||||
"es6-bundling": "./src/engine/keyboard/src/index.ts",
|
||||
"types": "./build/engine/keyboard/obj/index.d.ts",
|
||||
"import": "./build/engine/keyboard/obj/index.js"
|
||||
},
|
||||
"./engine/keyboard/node-keyboard-loader": {
|
||||
"es6-bundling": "./src/engine/keyboard/src/keyboards/loaders/node-keyboard-loader.ts",
|
||||
"types": "./build/engine/keyboard/obj/keyboards/loaders/node-keyboard-loader.d.ts",
|
||||
"import": "./build/engine/keyboard/obj/keyboards/loaders/node-keyboard-loader.js"
|
||||
},
|
||||
"./engine/keyboard/dom-keyboard-loader": {
|
||||
"es6-bundling": "./src/engine/keyboard/src/keyboards/loaders/dom-keyboard-loader.ts",
|
||||
"types": "./build/engine/keyboard/obj/keyboards/loaders/dom-keyboard-loader.d.ts",
|
||||
"import": "./build/engine/keyboard/obj/keyboards/loaders/dom-keyboard-loader.js"
|
||||
"es6-bundling": "./src/engine/src/keyboard/index.ts",
|
||||
"types": "./build/engine/obj/keyboard/index.d.ts",
|
||||
"import": "./build/engine/obj/keyboard/index.js"
|
||||
},
|
||||
"./engine/keyboard-storage": {
|
||||
"es6-bundling": "./src/engine/keyboard-storage/src/index.ts",
|
||||
"types": "./build/engine/keyboard-storage/obj/index.d.ts",
|
||||
"import": "./build/engine/keyboard-storage/obj/index.js",
|
||||
"require": "./build/engine/keyboard-storage/obj/index.js"
|
||||
},
|
||||
"./engine/keyboard-storage/dom-requester": {
|
||||
"es6-bundling": "./src/engine/keyboard-storage/src/domCloudRequester.ts",
|
||||
"types": "./build/engine/keyboard-storage/obj/domCloudRequester.d.ts",
|
||||
"import": "./build/engine/keyboard-storage/obj/domCloudRequester.js"
|
||||
},
|
||||
"./engine/keyboard-storage/node-requester": {
|
||||
"es6-bundling": "./src/engine/keyboard-storage/src/nodeCloudRequester.ts",
|
||||
"types": "./build/engine/keyboard-storage/obj/nodeCloudRequester.d.ts",
|
||||
"import": "./build/engine/keyboard-storage/obj/nodeCloudRequester.js"
|
||||
"es6-bundling": "./src/engine/src/keyboard-storage/index.ts",
|
||||
"types": "./build/engine/obj/keyboard-storage/index.d.ts",
|
||||
"import": "./build/engine/obj/keyboard-storage/index.js",
|
||||
"require": "./build/engine/obj/keyboard-storage/index.js"
|
||||
},
|
||||
"./engine/main": {
|
||||
"es6-bundling": "./src/engine/main/src/index.ts",
|
||||
"types": "./build/engine/main/obj/index.d.ts",
|
||||
"import": "./build/engine/main/obj/index.js"
|
||||
"es6-bundling": "./src/engine/src/main/index.ts",
|
||||
"types": "./build/engine/obj/main/index.d.ts",
|
||||
"import": "./build/engine/obj/main/index.js"
|
||||
},
|
||||
"./engine/osk": {
|
||||
"es6-bundling": "./src/engine/osk/src/index.ts",
|
||||
"types": "./build/engine/osk/obj/index.d.ts",
|
||||
"import": "./build/engine/osk/obj/index.js"
|
||||
},
|
||||
"./engine/osk/internals": {
|
||||
"types": "./build/engine/osk/obj/test-index.d.ts",
|
||||
"import": "./build/engine/osk/obj/test-index.js"
|
||||
"es6-bundling": "./src/engine/src/osk/index.ts",
|
||||
"types": "./build/engine/obj/osk/index.d.ts",
|
||||
"import": "./build/engine/obj/osk/index.js"
|
||||
},
|
||||
"./tools/testing/test-utils": {
|
||||
"types": "./build/tools/testing/test-utils/obj/index.d.ts",
|
||||
|
|
@ -93,7 +74,7 @@
|
|||
}
|
||||
},
|
||||
"imports": {
|
||||
"#gesture-tools": "./src/engine/osk/gesture-processor/build/tools/obj/index.js",
|
||||
"#gesture-tools": "./build/tools/testing/gesture-processor/unit-test-resources/obj/index.js",
|
||||
"#recorder": "./build/tools/testing/recorder/obj/index.js"
|
||||
},
|
||||
"repository": {
|
||||
|
|
@ -119,6 +100,7 @@
|
|||
"c8": "^7.12.0",
|
||||
"express": "^4.19.2",
|
||||
"jsdom": "^23.0.1",
|
||||
"promise-status-async": "^1.2.10",
|
||||
"tsx": "^4.19.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@ SUBPROJECT_NAME=app/browser
|
|||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Builds the Keyman Engine for Web's website-integrating version for use in non-puppeted browsers." \
|
||||
"@/web/src/engine/attachment build" \
|
||||
"@/web/src/engine/main build" \
|
||||
"@/web/src/engine build" \
|
||||
"@/web/src/tools/building/sourcemap-root" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
|
|
|
|||
|
|
@ -5,13 +5,15 @@
|
|||
"baseUrl": "./",
|
||||
"outDir": "../../../build/app/browser/obj/",
|
||||
"rootDir": "./src",
|
||||
"tsBuildInfoFile": "../../../build/app/browser/obj/tsconfig.tsbuildinfo"
|
||||
"tsBuildInfoFile": "../../../build/app/browser/obj/tsconfig.tsbuildinfo",
|
||||
"paths": {
|
||||
"keyman/engine/*": [ "../../engine/src/*/index.js" ],
|
||||
}
|
||||
},
|
||||
|
||||
"include": [ "**/*.ts" ],
|
||||
|
||||
"references": [
|
||||
{ "path": "../../engine/attachment" },
|
||||
{ "path": "../../engine/main" }
|
||||
{ "path": "../../engine" },
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
"outDir": "../../../build/app/ui/obj",
|
||||
"rootDir": "",
|
||||
"tsBuildInfoFile": "../../../build/app/ui/obj/tsconfig.tsbuildinfo",
|
||||
"paths": {
|
||||
"keyman/engine/*": ["../../engine/src/*/index.js"],
|
||||
},
|
||||
},
|
||||
"files": [
|
||||
"kmwuibutton.ts",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ SUBPROJECT_NAME=app/webview
|
|||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Builds the Keyman Engine for Web's puppetable version designed for use within WebViews." \
|
||||
"@/web/src/engine/main build" \
|
||||
"@/web/src/engine build" \
|
||||
"@/web/src/tools/building/sourcemap-root" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
|
|
|
|||
|
|
@ -5,12 +5,15 @@
|
|||
"baseUrl": "./",
|
||||
"outDir": "../../../build/app/webview/obj/",
|
||||
"rootDir": "./src",
|
||||
"tsBuildInfoFile": "../../../build/app/webview/obj/tsconfig.tsbuildinfo"
|
||||
"tsBuildInfoFile": "../../../build/app/webview/obj/tsconfig.tsbuildinfo",
|
||||
"paths": {
|
||||
"keyman/engine/*": ["../../engine/src/*/index.js"],
|
||||
},
|
||||
},
|
||||
|
||||
"include": [ "**/*.ts" ],
|
||||
|
||||
"references": [
|
||||
{ "path": "../../engine/main" }
|
||||
{ "path": "../../engine" }
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"clean": true,
|
||||
"exclude-after-remap": true,
|
||||
"reporter": ["text", "text-summary"],
|
||||
"reports-dir": "../../../build/coverage/raw/engine/interfaces",
|
||||
"reports-dir": "../../build/coverage/raw/engine/",
|
||||
"src": [
|
||||
"src/"
|
||||
]
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"check-coverage": false,
|
||||
"clean": true,
|
||||
"exclude-after-remap": true,
|
||||
"reporter": ["text", "text-summary"],
|
||||
"reports-dir": "../../../build/coverage/raw/engine/attachment",
|
||||
"src": [
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
# Imports common Web build-script definitions & functions
|
||||
SUBPROJECT_NAME=engine/attachment
|
||||
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
. "$KEYMAN_ROOT/web/common.inc.sh"
|
||||
|
||||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Builds the Keyman Engine for Web (KMW) attachment engine." \
|
||||
"@/web/src/engine/dom-utils" \
|
||||
"@/web/src/engine/element-wrappers" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"test"
|
||||
|
||||
# Possible TODO?
|
||||
# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $DOC_BUILD_EMBED_WEB" \
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /node_modules \
|
||||
build /web/build/$SUBPROJECT_NAME/lib/index.mjs
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#### Build action definitions ####
|
||||
|
||||
do_build () {
|
||||
compile $SUBPROJECT_NAME
|
||||
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/lib/index.mjs" \
|
||||
--format esm
|
||||
}
|
||||
|
||||
builder_run_action configure node_select_version_and_npm_ci
|
||||
builder_run_action clean rm -rf "$KEYMAN_ROOT/web/build/$SUBPROJECT_NAME"
|
||||
builder_run_action build do_build
|
||||
builder_run_action test test-headless-typescript "${SUBPROJECT_NAME}"
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/engine/attachment/obj/",
|
||||
"tsBuildInfoFile": "../../../build/engine/attachment/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
|
||||
"include": [ "src/**/*.ts" ],
|
||||
|
||||
"references": [
|
||||
{ "path": "../dom-utils" },
|
||||
{ "path": "../element-wrappers" }
|
||||
]
|
||||
}
|
||||
73
web/src/engine/build.sh
Executable file
73
web/src/engine/build.sh
Executable file
|
|
@ -0,0 +1,73 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
# Imports common Web build-script definitions & functions
|
||||
|
||||
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
. "$KEYMAN_ROOT/web/common.inc.sh"
|
||||
|
||||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Builds Keyman Engine for Web (KMW)" \
|
||||
"@/core:wasm" \
|
||||
"@/web/src/engine/predictive-text" \
|
||||
"@/web/src/engine/common/web-utils" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"test"
|
||||
|
||||
# Possible TODO?
|
||||
# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $DOC_BUILD_EMBED_WEB" \
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /node_modules \
|
||||
build /web/build/engine/lib/index.mjs
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#### Build action definitions ####
|
||||
|
||||
copy_deps() {
|
||||
mkdir -p "src/core-processor/import/core/"
|
||||
# we don't need this file for release builds, but it's nice to have
|
||||
# for reference and auto-completion
|
||||
cp "${KEYMAN_ROOT}/core/build/wasm/${BUILDER_CONFIGURATION}/src/keymancore.d.ts" "src/core-processor/import/core/"
|
||||
|
||||
mkdir -p "${KEYMAN_ROOT}/web/build/engine/core-processor/obj/import/core/"
|
||||
cp "${KEYMAN_ROOT}/core/build/wasm/${BUILDER_CONFIGURATION}/src/keymancore.d.ts" "${KEYMAN_ROOT}/web/build/engine/core-processor/obj/import/core/"
|
||||
cp "${KEYMAN_ROOT}/core/build/wasm/${BUILDER_CONFIGURATION}/src/"km-core{.js,.wasm} "${KEYMAN_ROOT}/web/build/engine/core-processor/obj/import/core/"
|
||||
|
||||
cp "$KEYMAN_ROOT/common/resources/fonts/keymanweb-osk.ttf" "$KEYMAN_ROOT/web/src/resources/osk/"
|
||||
}
|
||||
|
||||
do_build () {
|
||||
# eslint .
|
||||
|
||||
copy_deps
|
||||
|
||||
tsc -b .
|
||||
|
||||
# So... tsc does declaration-bundling on its own pretty well, at least for local development.
|
||||
tsc --emitDeclarationOnly --outFile "${KEYMAN_ROOT}/web/build/engine/lib/index.d.ts" -p "."
|
||||
|
||||
node "${KEYMAN_ROOT}/web/src/tools/es-bundling/build/common-bundle.mjs" \
|
||||
"${KEYMAN_ROOT}/web/build/engine/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/web/build/engine/lib/index.mjs" \
|
||||
--format esm
|
||||
|
||||
# TODO-web-core: should this be in test/?
|
||||
echo "Validating gesture model and set references"
|
||||
node src/osk/validate-gesture-specs.js
|
||||
}
|
||||
|
||||
builder_run_action configure node_select_version_and_npm_ci
|
||||
builder_run_action clean rm -rf "$KEYMAN_ROOT/web/build/engine"
|
||||
builder_run_action build do_build
|
||||
builder_run_action test test-headless-typescript engine
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@keymanapp/web-utils",
|
||||
"description": "Common utility functions used throughout other Keyman packages",
|
||||
"description": "Common utility functions used in both Keyman Engine for Web and the predictive text worker",
|
||||
"main": "./build/obj/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
|
|
|
|||
1
web/src/engine/core-processor/.gitignore
vendored
1
web/src/engine/core-processor/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
src/import/
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
SUBPROJECT_NAME=engine/core-processor
|
||||
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
. "$KEYMAN_ROOT/web/common.inc.sh"
|
||||
|
||||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Keyman Core WASM integration" \
|
||||
"@/core:wasm" \
|
||||
"@/web/src/engine/common/web-utils" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"test" \
|
||||
"--ci+ Set to utilize CI-based test configurations & reporting."
|
||||
|
||||
builder_describe_outputs \
|
||||
configure "/web/src/engine/core-processor/src/import/core/keymancore.d.ts" \
|
||||
build "/web/build/${SUBPROJECT_NAME}/lib/index.mjs"
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#### Build action definitions ####
|
||||
|
||||
do_clean() {
|
||||
rm -rf "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}"
|
||||
rm -rf "src/import/"
|
||||
}
|
||||
|
||||
do_configure() {
|
||||
node_select_version_and_npm_ci
|
||||
|
||||
mkdir -p "src/import/core/"
|
||||
# we don't need this file for release builds, but it's nice to have
|
||||
# for reference and auto-completion
|
||||
cp "${KEYMAN_ROOT}/core/build/wasm/${BUILDER_CONFIGURATION}/src/keymancore.d.ts" "src/import/core/"
|
||||
}
|
||||
|
||||
copy_deps() {
|
||||
mkdir -p "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/import/core/"
|
||||
cp "${KEYMAN_ROOT}/core/build/wasm/${BUILDER_CONFIGURATION}/src/keymancore.d.ts" "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/import/core/"
|
||||
cp "${KEYMAN_ROOT}/core/build/wasm/${BUILDER_CONFIGURATION}/src/"km-core{.js,.wasm} "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/import/core/"
|
||||
}
|
||||
|
||||
do_build () {
|
||||
copy_deps
|
||||
compile "${SUBPROJECT_NAME}"
|
||||
|
||||
${BUNDLE_CMD} "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/lib/index.mjs" \
|
||||
--format esm
|
||||
}
|
||||
|
||||
builder_run_action clean do_clean
|
||||
builder_run_action configure do_configure
|
||||
builder_run_action build do_build
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
// While the actual references themselves are headless, it compiles against the DOM-reliant OSK module.
|
||||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/engine/core-processor/obj/",
|
||||
"tsBuildInfoFile": "../../../build/engine/core-processor/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
|
||||
"include": [ "**/*.ts", "src/import/core/km-core.js" ],
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
|
||||
# Imports common Web build-script definitions & functions
|
||||
SUBPROJECT_NAME=engine/dom-utils
|
||||
. "$KEYMAN_ROOT/web/common.inc.sh"
|
||||
|
||||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Builds DOM-utility modules used by the Keyman Engine for Web (KMW)." \
|
||||
"@/web/src/engine/common/web-utils" \
|
||||
"@/web/src/engine/keyboard" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"test"
|
||||
|
||||
# Possible TODO?
|
||||
# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $DOC_BUILD_EMBED_WEB" \
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /node_modules \
|
||||
build /web/build/$SUBPROJECT_NAME/obj/index.js
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#### Build action definitions ####
|
||||
|
||||
builder_run_action configure node_select_version_and_npm_ci
|
||||
builder_run_action clean rm -rf "$KEYMAN_ROOT/web/build/$SUBPROJECT_NAME"
|
||||
builder_run_action build compile $SUBPROJECT_NAME
|
||||
|
||||
# No headless tests for this child project. Currently, DOM-based unit &
|
||||
# integrated tests are run solely by the top-level $KEYMAN_ROOT/web project.
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/engine/dom-utils/obj/",
|
||||
"tsBuildInfoFile": "../../../build/engine/dom-utils/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
|
||||
"include": [ "src/**/*.ts" ],
|
||||
|
||||
"references": [
|
||||
{ "path": "../keyboard" },
|
||||
{ "path": "../common/web-utils" }
|
||||
]
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
SUBPROJECT_NAME=engine/element-wrappers
|
||||
. "$KEYMAN_ROOT/web/common.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
|
||||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Builds DOM-based OutputTarget subclasses used by the Keyman Engine for Web (KMW)." \
|
||||
"@/web/src/engine/js-processor" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"test"
|
||||
|
||||
# Possible TODO?
|
||||
# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $DOC_BUILD_EMBED_WEB" \
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /node_modules \
|
||||
build /web/build/$SUBPROJECT_NAME/lib/index.mjs
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#### Build action definitions ####
|
||||
|
||||
do_build () {
|
||||
compile $SUBPROJECT_NAME
|
||||
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/lib/index.mjs" \
|
||||
--format esm
|
||||
}
|
||||
|
||||
builder_run_action configure node_select_version_and_npm_ci
|
||||
builder_run_action clean rm -rf "$KEYMAN_ROOT/web/build/$SUBPROJECT_NAME"
|
||||
builder_run_action build do_build
|
||||
|
||||
# No headless tests for this child project. Currently, DOM-based unit &
|
||||
# integrated tests are run solely by the top-level $KEYMAN_ROOT/web project.
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
## engine/element-wrappers
|
||||
|
||||
This submodule provides a subset of the main engine's Web-oriented code that's used to 'wrap' webpage
|
||||
elements as part of KMW attachment and interface the element with the `keyboard` submodule.
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/engine/element-wrappers/obj/",
|
||||
"tsBuildInfoFile": "../../../build/engine/element-wrappers/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
|
||||
"include": [ "src/**/*.ts" ],
|
||||
|
||||
"references": [
|
||||
{ "path": "../keyboard" }
|
||||
]
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
SUBPROJECT_NAME=engine/events
|
||||
. "$KEYMAN_ROOT/web/common.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
|
||||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Builds specialized event-related modules utilized by Keyman Engine for Web." \
|
||||
"@/web/src/engine/common/web-utils build" \
|
||||
"@/web/src/engine/keyboard build" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"test"
|
||||
|
||||
# Possible TODO?
|
||||
# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $DOC_BUILD_EMBED_WEB" \
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /node_modules \
|
||||
build /web/build/$SUBPROJECT_NAME/obj/index.js
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#### Build action definitions ####
|
||||
|
||||
do_build () {
|
||||
compile $SUBPROJECT_NAME
|
||||
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/lib/index.mjs" \
|
||||
--format esm
|
||||
}
|
||||
|
||||
builder_run_action configure node_select_version_and_npm_ci
|
||||
builder_run_action clean rm -rf "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}"
|
||||
builder_run_action build do_build
|
||||
builder_run_action test test-headless "${SUBPROJECT_NAME}"
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/engine/events/obj/",
|
||||
"tsBuildInfoFile": "../../../build/engine/events/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
|
||||
"include": [ "src/**/*.ts" ],
|
||||
|
||||
"references": [
|
||||
{ "path": "../common/web-utils" },
|
||||
{ "path": "../keyboard" }
|
||||
]
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
SUBPROJECT_NAME=engine/interfaces
|
||||
. "$KEYMAN_ROOT/web/common.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
|
||||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Builds configuration subclasses used by the Keyman Engine for Web (KMW)." \
|
||||
"@/web/src/tools/es-bundling" \
|
||||
"@/web/src/engine/keyboard" \
|
||||
"@/web/src/engine/js-processor" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"test"
|
||||
|
||||
# Possible TODO?s
|
||||
# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $DOC_BUILD_EMBED_WEB" \
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /node_modules \
|
||||
build /web/build/$SUBPROJECT_NAME/lib/index.mjs
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#### Build action definitions ####
|
||||
|
||||
do_build () {
|
||||
compile $SUBPROJECT_NAME
|
||||
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/lib/index.mjs" \
|
||||
--format esm
|
||||
}
|
||||
|
||||
builder_run_action configure node_select_version_and_npm_ci
|
||||
builder_run_action clean rm -rf "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}"
|
||||
builder_run_action build do_build
|
||||
builder_run_action test test-headless "${SUBPROJECT_NAME}"
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
// While the actual references themselves are headless, it compiles against the DOM-reliant OSK module.
|
||||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/engine/interfaces/obj/",
|
||||
"tsBuildInfoFile": "../../../build/engine/interfaces/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
|
||||
"include": [ "**/*.ts" ],
|
||||
|
||||
"references": [
|
||||
{ "path": "../keyboard" },
|
||||
]
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
SUBPROJECT_NAME=engine/js-processor
|
||||
|
||||
. "${KEYMAN_ROOT}/web/common.inc.sh"
|
||||
. "${KEYMAN_ROOT}/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
|
||||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Builds configuration subclasses used by the Keyman Engine for Web (KMW)." \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"test"
|
||||
|
||||
builder_describe_outputs \
|
||||
configure "/node_modules" \
|
||||
build "/web/build/${SUBPROJECT_NAME}/lib/index.mjs"
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#### Build action definitions ####
|
||||
|
||||
do_build () {
|
||||
compile "${SUBPROJECT_NAME}"
|
||||
|
||||
${BUNDLE_CMD} "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/lib/index.mjs" \
|
||||
--format esm
|
||||
}
|
||||
|
||||
do_test() {
|
||||
test-headless "${SUBPROJECT_NAME}" ""
|
||||
test-headless-typescript "${SUBPROJECT_NAME}"
|
||||
}
|
||||
|
||||
builder_run_action configure node_select_version_and_npm_ci
|
||||
builder_run_action clean rm -rf "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}"
|
||||
builder_run_action build do_build
|
||||
builder_run_action test do_test
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
// While the actual references themselves are headless, it compiles against the DOM-reliant OSK module.
|
||||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/engine/js-processor/obj/",
|
||||
"tsBuildInfoFile": "../../../build/engine/js-processor/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
|
||||
"references": [
|
||||
{ "path": "../keyboard"},
|
||||
],
|
||||
"include": [ "**/*.ts" ],
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"check-coverage": false,
|
||||
"clean": true,
|
||||
"exclude-after-remap": true,
|
||||
"reporter": ["text", "text-summary"],
|
||||
"reports-dir": "../../../build/coverage/raw/engine/keyboard-storage",
|
||||
"src": [
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
SUBPROJECT_NAME=engine/keyboard-storage
|
||||
. "$KEYMAN_ROOT/web/common.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
|
||||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Builds Keyman Engine modules for keyboard cloud-querying & caching + model caching." \
|
||||
"@/web/src/tools/es-bundling" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"test"
|
||||
|
||||
# Possible TODO?s
|
||||
# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $DOC_BUILD_EMBED_WEB" \
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /node_modules \
|
||||
build /web/build/$SUBPROJECT_NAME/lib/index.mjs
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#### Build action definitions ####
|
||||
|
||||
do_build () {
|
||||
compile $SUBPROJECT_NAME
|
||||
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/lib/index.mjs" \
|
||||
--format esm
|
||||
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/domCloudRequester.js" \
|
||||
--out "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/lib/dom-cloud-requester.mjs" \
|
||||
--format esm
|
||||
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/nodeCloudRequester.js" \
|
||||
--out "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/lib/node-cloud-requester.mjs" \
|
||||
--format esm \
|
||||
--platform node
|
||||
}
|
||||
|
||||
builder_run_action configure node_select_version_and_npm_ci
|
||||
builder_run_action clean rm -rf "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}"
|
||||
builder_run_action build do_build
|
||||
builder_run_action test test-headless "${SUBPROJECT_NAME}"
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/engine/keyboard-storage/obj/",
|
||||
"tsBuildInfoFile": "../../../build/engine/keyboard-storage/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
|
||||
"include": [ "src/**/*.ts" ],
|
||||
|
||||
"references": [
|
||||
{ "path": "../interfaces" }
|
||||
]
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"check-coverage": false,
|
||||
"clean": true,
|
||||
"exclude": [
|
||||
"src/keyboards/loaders/dom*",
|
||||
"node_modules/*",
|
||||
"tests"
|
||||
],
|
||||
"exclude-after-remap": true,
|
||||
"reporter": ["text", "text-summary"],
|
||||
"reports-dir": "../../../build/coverage/raw/engine/keyboard",
|
||||
"src": [
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
18
web/src/engine/keyboard/.gitignore
vendored
18
web/src/engine/keyboard/.gitignore
vendored
|
|
@ -1,18 +0,0 @@
|
|||
# Build products
|
||||
src/environment.inc.ts
|
||||
|
||||
# Legacy build folders.
|
||||
output/
|
||||
build/
|
||||
embedded/
|
||||
|
||||
# Current build output folder (matches standard node publish location).
|
||||
dist/
|
||||
|
||||
# Other local files.
|
||||
node_modules/
|
||||
unit_tests/modernizr.js
|
||||
source/environment.inc.ts
|
||||
.idea/**/*.xml
|
||||
*.iml
|
||||
*.kpj.user
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Compile KeymanWeb's 'keyboard' module, one of the components of Web's 'core' module.
|
||||
#
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
SUBPROJECT_NAME=engine/keyboard
|
||||
|
||||
. "${KEYMAN_ROOT}/web/common.inc.sh"
|
||||
. "${KEYMAN_ROOT}/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
|
||||
################################ Main script ################################
|
||||
|
||||
builder_describe \
|
||||
"Compiles the web-oriented utility function module." \
|
||||
"@/common/web/keyman-version" \
|
||||
"@/common/web/types" \
|
||||
"@/web/src/tools/testing/recorder-core test" \
|
||||
"@/web/src/tools/es-bundling" \
|
||||
"@/web/src/engine/common/web-utils" \
|
||||
"@/web/src/engine/core-processor" \
|
||||
configure \
|
||||
clean \
|
||||
build \
|
||||
test
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /node_modules \
|
||||
build /web/build/engine/keyboard/lib/index.mjs
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
function do_configure() {
|
||||
node_select_version_and_npm_ci
|
||||
|
||||
# Configure Web browser-engine testing environments. As is, this should only
|
||||
# make changes when we update the dependency, even on our CI build agents.
|
||||
playwright install
|
||||
}
|
||||
|
||||
BUILD_DIR="${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}"
|
||||
|
||||
do_build() {
|
||||
tsc --build "${THIS_SCRIPT_PATH}/tsconfig.all.json"
|
||||
|
||||
# Base product - the main keyboard processor
|
||||
builder_echo "Bundle base product - the main keyboard processor"
|
||||
${BUNDLE_CMD} "${BUILD_DIR}/obj/index.js" \
|
||||
--out "${BUILD_DIR}/lib/index.mjs" \
|
||||
--format esm
|
||||
|
||||
# The DOM-oriented keyboard loader
|
||||
builder_echo "Bundle the DOM-oriented keyboard loader"
|
||||
${BUNDLE_CMD} "${BUILD_DIR}/obj/keyboards/loaders/dom-keyboard-loader.js" \
|
||||
--out "${BUILD_DIR}/lib/dom-keyboard-loader.mjs" \
|
||||
--format esm
|
||||
|
||||
# The Node-oriented keyboard loader
|
||||
builder_echo "Bundle the Node-oriented keyboard loader"
|
||||
${BUNDLE_CMD} "${BUILD_DIR}/obj/keyboards/loaders/node-keyboard-loader.js" \
|
||||
--out "${BUILD_DIR}/lib/node-keyboard-loader.mjs" \
|
||||
--format esm \
|
||||
--platform node
|
||||
|
||||
# Declaration bundling.
|
||||
builder_echo "Declaration bundling"
|
||||
tsc --emitDeclarationOnly --outFile "${BUILD_DIR}/lib/index.d.ts"
|
||||
tsc --emitDeclarationOnly --outFile "${BUILD_DIR}/lib/dom-keyboard-loader.d.ts" -p src/keyboards/loaders/tsconfig.dom.json
|
||||
tsc --emitDeclarationOnly --outFile "${BUILD_DIR}/lib/node-keyboard-loader.d.ts" -p src/keyboards/loaders/tsconfig.node.json
|
||||
}
|
||||
|
||||
do_test() {
|
||||
test-headless "${SUBPROJECT_NAME}" ""
|
||||
test-headless-typescript "${SUBPROJECT_NAME}"
|
||||
}
|
||||
|
||||
builder_run_action configure do_configure
|
||||
builder_run_action clean rm -rf "${BUILD_DIR}"
|
||||
builder_run_action build do_build
|
||||
builder_run_action test do_test
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"extends": "../../../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "../../../",
|
||||
"outDir": "../../../../../../build/engine/keyboard/obj/keyboards/loaders/",
|
||||
"tsBuildInfoFile": "../../../../../../build/engine/keyboard/obj/keyboards/loaders/tsconfig.dom.tsbuildinfo",
|
||||
"rootDir": "."
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../../../tsconfig.json" }
|
||||
],
|
||||
"include": ["dom-keyboard-loader.ts", "domKeyboardLoader.ts"],
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/engine/keyboard/obj/",
|
||||
"tsBuildInfoFile": "../../../build/engine/keyboard/obj/tsconfig.all.tsbuildinfo",
|
||||
"rootDir": "./src/"
|
||||
},
|
||||
"references": [
|
||||
{ "path": "./src/keyboards/loaders/tsconfig.dom.json" },
|
||||
{ "path": "./src/keyboards/loaders/tsconfig.node.json" },
|
||||
],
|
||||
// Actual main-body compilation is in tsconfig.json. This config is just a wrapper
|
||||
// to trigger all three components at once.
|
||||
"include": []
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
// Is used by the keyboard-loader submodules.
|
||||
{
|
||||
"extends": "../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/engine/keyboard/obj/",
|
||||
"tsBuildInfoFile": "../../../build/engine/keyboard/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src/"
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../core-processor"},
|
||||
],
|
||||
"include": [ "./src/**/*.ts"],
|
||||
"exclude": ["./src/keyboards/loaders/**/*.ts"]
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "$(dirname "$THIS_SCRIPT")/../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
SUBPROJECT_NAME=engine/main
|
||||
. "$KEYMAN_ROOT/web/common.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
|
||||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Builds the Keyman Engine for Web's common top-level base classes." \
|
||||
"@/common/web/keyman-version" \
|
||||
"@/web/src/engine/core-processor" \
|
||||
"@/web/src/engine/keyboard" \
|
||||
"@/web/src/engine/interfaces build" \
|
||||
"@/web/src/engine/js-processor build" \
|
||||
"@/web/src/engine/keyboard-storage build" \
|
||||
"@/web/src/engine/osk build" \
|
||||
"@/web/src/engine/predictive-text/worker-main" \
|
||||
"@/developer/src/kmc-model test" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"test"
|
||||
|
||||
# Possible TODO?s
|
||||
# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $DOC_BUILD_EMBED_WEB" \
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /node_modules \
|
||||
build /web/build/$SUBPROJECT_NAME/lib/index.mjs
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#### Build action definitions ####
|
||||
|
||||
do_build () {
|
||||
compile $SUBPROJECT_NAME
|
||||
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/lib/index.mjs" \
|
||||
--format esm
|
||||
}
|
||||
|
||||
builder_run_action configure node_select_version_and_npm_ci
|
||||
builder_run_action clean rm -rf "$KEYMAN_ROOT/web/build/$SUBPROJECT_NAME"
|
||||
builder_run_action build do_build
|
||||
builder_run_action test test-headless "${SUBPROJECT_NAME}"
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../../build/engine/main/obj/",
|
||||
"tsBuildInfoFile": "../../../build/engine/main/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
|
||||
"include": [ "src/**/*.ts" ],
|
||||
|
||||
"references": [
|
||||
{ "path": "../osk" },
|
||||
{ "path": "../keyboard-storage" },
|
||||
{ "path": "../interfaces" },
|
||||
{ "path": "../js-processor" }
|
||||
]
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "${THIS_SCRIPT%/*}/../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
SUBPROJECT_NAME=engine/osk
|
||||
. "$KEYMAN_ROOT/web/common.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
|
||||
# ################################ Main script ################################
|
||||
|
||||
builder_describe "Builds the Keyman Engine for Web's On-Screen Keyboard package (OSK)." \
|
||||
"@/web/src/engine/keyboard build" \
|
||||
"@/web/src/engine/interfaces build" \
|
||||
"@/web/src/engine/dom-utils build" \
|
||||
"@/web/src/engine/events build" \
|
||||
"@/web/src/engine/osk/gesture-processor" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"test"
|
||||
|
||||
# Possible TODO?s
|
||||
# "upload-symbols Uploads build product to Sentry for error report symbolification. Only defined for $DOC_BUILD_EMBED_WEB" \
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /web/src/resources/osk/keymanweb-osk.ttf \
|
||||
build /web/build/$SUBPROJECT_NAME/lib/index.mjs
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
#### Build action definitions ####
|
||||
|
||||
do_clean() {
|
||||
rm -rf "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}"
|
||||
|
||||
./gesture-processor/build.sh clean
|
||||
}
|
||||
|
||||
do_configure() {
|
||||
node_select_version_and_npm_ci
|
||||
cp "$KEYMAN_ROOT/common/resources/fonts/keymanweb-osk.ttf" "$KEYMAN_ROOT/web/src/resources/osk/"
|
||||
}
|
||||
|
||||
do_build() {
|
||||
compile "${SUBPROJECT_NAME}"
|
||||
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/web/build/${SUBPROJECT_NAME}/lib/index.mjs" \
|
||||
--format esm
|
||||
|
||||
echo "Validating gesture model and set references"
|
||||
node validate-gesture-specs.js
|
||||
}
|
||||
|
||||
do_test() {
|
||||
test-headless-typescript "${SUBPROJECT_NAME}"
|
||||
|
||||
./gesture-processor/build.sh test
|
||||
}
|
||||
|
||||
builder_run_action configure do_configure
|
||||
builder_run_action clean do_clean
|
||||
builder_run_action build do_build
|
||||
builder_run_action test do_test
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
"check-coverage": false,
|
||||
"clean": true,
|
||||
"exclude": [
|
||||
"src/test/*",
|
||||
"node_modules/*",
|
||||
"src/tools/*"
|
||||
],
|
||||
"exclude-after-remap": true,
|
||||
"include": [
|
||||
"src/engine/headless/*"
|
||||
],
|
||||
"reporter": ["text", "text-summary"],
|
||||
"reports-dir": "../../../../build/coverage/raw/engine/osk/gesture-processor",
|
||||
"src": [
|
||||
"src/engine/headless/*"
|
||||
]
|
||||
}
|
||||
11
web/src/engine/osk/gesture-processor/.gitignore
vendored
11
web/src/engine/osk/gesture-processor/.gitignore
vendored
|
|
@ -1,11 +0,0 @@
|
|||
# Build products
|
||||
build
|
||||
|
||||
# Legacy build folders.
|
||||
|
||||
# Other local files.
|
||||
node_modules/
|
||||
unit_tests/modernizr.js
|
||||
.idea/**/*.xml
|
||||
*.iml
|
||||
*.kpj.user
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
## START STANDARD BUILD SCRIPT INCLUDE
|
||||
# adjust relative paths as necessary
|
||||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||
. "$(dirname "$THIS_SCRIPT")/../../../../../resources/build/builder-full.inc.sh"
|
||||
## END STANDARD BUILD SCRIPT INCLUDE
|
||||
|
||||
SUBPROJECT_NAME=engine/osk/gesture-processor
|
||||
|
||||
. "${KEYMAN_ROOT}/web/common.inc.sh"
|
||||
. "${KEYMAN_ROOT}/resources/build/utils.inc.sh"
|
||||
. "$KEYMAN_ROOT/resources/build/node.inc.sh"
|
||||
|
||||
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" \
|
||||
"@/web/src/tools/es-bundling build" \
|
||||
"@/web/src/engine/common/web-utils build" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
"test" \
|
||||
":module" \
|
||||
":tools tools for testing & developing test resources for this module"
|
||||
|
||||
builder_describe_outputs \
|
||||
configure /node_modules \
|
||||
build:module "${BUILD_DIR}/lib/index.mjs" \
|
||||
build:tools "${BUILD_DIR}/tools/lib/index.mjs"
|
||||
|
||||
builder_parse "$@"
|
||||
|
||||
# TODO: build if out-of-date if test is specified
|
||||
# TODO: configure if npm has not been run, and build is specified
|
||||
|
||||
function do_configure() {
|
||||
node_select_version_and_npm_ci
|
||||
}
|
||||
|
||||
function do_build_module() {
|
||||
# Build
|
||||
tsc --build $builder_verbose
|
||||
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/${BUILD_DIR}/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/${BUILD_DIR}/lib/index.mjs" \
|
||||
--format esm
|
||||
}
|
||||
|
||||
function do_test_tools() {
|
||||
if ! builder_has_action test:module; then
|
||||
echo "The $(builder_term test:tools) action is currently a no-op."
|
||||
fi
|
||||
}
|
||||
|
||||
builder_run_action configure do_configure
|
||||
builder_run_action clean rm -rf build/
|
||||
builder_run_action build:module do_build_module
|
||||
builder_run_action build:tools src/tools/build.sh build
|
||||
builder_run_action test:module test-headless-typescript "${SUBPROJECT_NAME}"
|
||||
builder_run_action test:tools do_test_tools
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"name": "@keymanapp/gesture-recognizer",
|
||||
"description": "The core gesture-recognition engine used by Keyman's Web-based OSKs.",
|
||||
"devDependencies": {
|
||||
"@keymanapp/resources-gosh": "*",
|
||||
"promise-status-async": "^1.2.10",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "gosh ./build.sh",
|
||||
"test": "gosh ./build.sh test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@keymanapp/web-utils": "*",
|
||||
"eventemitter3": "^5.0.0"
|
||||
},
|
||||
"main": "./build/obj/index.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"es6-bundling": "./src/engine/index.ts",
|
||||
"default": "./build/obj/index.js"
|
||||
}
|
||||
},
|
||||
"types": "./build/obj/index.d.ts",
|
||||
"type": "module",
|
||||
"sideEffects": false
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"extends": "../../../../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"lib": [ "dom", "es6" ],
|
||||
"outDir": "../../../build/tools/obj",
|
||||
"rootDir": "./src",
|
||||
"tsBuildInfoFile": "../../../build/tools/tsconfig.tsbuildinfo"
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../../../." }
|
||||
],
|
||||
"include": ["./src/**/*.ts"]
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"lib": [ "dom", "es6" ],
|
||||
"outDir": "./build/obj/",
|
||||
"rootDir": "./src/engine",
|
||||
"tsBuildInfoFile": "./build/obj/tsconfig.tsbuildinfo",
|
||||
},
|
||||
"include": ["./src/engine/**/*.ts"],
|
||||
"references": [
|
||||
{ "path": "../../common/web-utils" },
|
||||
],
|
||||
"exclude": ["./src/test/**/*.ts", "./src/tools/**/*.ts"]
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"extends": "../../tsconfig.dom.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"downlevelIteration": true,
|
||||
"outDir": "../../../build/engine/osk/obj/",
|
||||
"tsBuildInfoFile": "../../../build/engine/osk/obj/tsconfig.tsbuildinfo",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
|
||||
"include": [ "src/**/*.ts" ],
|
||||
|
||||
"references": [
|
||||
{ "path": "./gesture-processor" },
|
||||
{ "path": "../interfaces" },
|
||||
{ "path": "../dom-utils" },
|
||||
{ "path": "../events" }
|
||||
]
|
||||
}
|
||||
|
|
@ -19,6 +19,7 @@ SUBPROJECT_NAME=engine/predictive-text/wordbreakers
|
|||
# Note: the raw text files used for data.inc.ts are found within
|
||||
# /resources/standards-data/unicode-character-database.
|
||||
builder_describe "Builds the predictive-text wordbreaker implementation module" \
|
||||
"@/common/web/types" \
|
||||
"clean" \
|
||||
"configure" \
|
||||
"build" \
|
||||
|
|
|
|||
1
web/src/engine/src/core-processor/.gitignore
vendored
Normal file
1
web/src/engine/src/core-processor/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
import/
|
||||
|
|
@ -1,3 +1,9 @@
|
|||
## engine/element-wrappers
|
||||
|
||||
This submodule provides a subset of the main engine's Web-oriented code that's used to 'wrap' webpage
|
||||
elements as part of KMW attachment and interface the element with the `keyboard` submodule.
|
||||
|
||||
|
||||
Please keep any code in this folder / namespace as free as possible from dependencies on other parts of KMW. Some of our unit tests wish to run against these types without requiring KMW to be active.
|
||||
|
||||
Note that with a little work, we _could_ completely spin this into its own separate module - this could be useful for development and testing purposes, especially now that we've dropped the old `TouchAlias` type that was a bit entangled with main engine code.
|
||||
|
|
@ -120,7 +120,7 @@ export function preprocessRecognizerConfig<HoveredItemType, StateToken = any>(
|
|||
processingConfig.maxRoamingBounds = processingConfig.maxRoamingBounds ?? processingConfig.targetRoot;
|
||||
processingConfig.safeBounds = processingConfig.safeBounds ?? new PaddedZoneSource([2]);
|
||||
|
||||
processingConfig.itemIdentifier = processingConfig.itemIdentifier ?? (() => null);
|
||||
processingConfig.itemIdentifier = processingConfig.itemIdentifier ?? (():any => null);
|
||||
processingConfig.recordingMode = !!processingConfig.recordingMode;
|
||||
processingConfig.historyLength = (processingConfig.historyLength ?? 0) > 0 ? processingConfig.historyLength : 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue