mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-21 15:17:40 +00:00
change(web): converts most of lower-level Web module scripts
This commit is contained in:
parent
d0edbf03fe
commit
df2436b5c4
8 changed files with 23 additions and 37 deletions
|
|
@ -1,10 +0,0 @@
|
|||
import esbuild from 'esbuild';
|
||||
import { esmConfiguration } from '../web/es-bundling/build/index.mjs';
|
||||
|
||||
await esbuild.build({
|
||||
...esmConfiguration,
|
||||
entryPoints: {
|
||||
'index': 'build/obj/web/index.js',
|
||||
},
|
||||
outdir: 'build/lib/web' // We want to preserve the subdirectory for this one.
|
||||
});
|
||||
|
|
@ -20,6 +20,8 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
|||
# This script runs from its own folder
|
||||
cd "$(dirname "$THIS_SCRIPT")"
|
||||
|
||||
BUNDLE_CMD="node $KEYMAN_ROOT/common/web/es-bundling/build/common-bundle.mjs"
|
||||
|
||||
################################ Main script ################################
|
||||
|
||||
# "@../models/types" \ # is just a .d.ts, so there's nothing to actually BUILD.
|
||||
|
|
@ -45,7 +47,9 @@ function do_build() {
|
|||
tsc -b ./tsconfig.all.json
|
||||
|
||||
# esbuild-bundled products at this level are not intended to be used for anything but testing.
|
||||
node build-bundler.js
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/common/predictive-text/build/obj/web/index.js" \
|
||||
--out "${KEYMAN_ROOT}/common/predictive-text/build/lib/web/index.mjs" \
|
||||
--format esm
|
||||
}
|
||||
|
||||
# Note - the actual test setup is done in a separate test script, but it's easy
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
import esbuild from 'esbuild';
|
||||
import { esmConfiguration, bundleObjEntryPoints, prepareTslibTreeshaking } from '../es-bundling/build/index.mjs';
|
||||
|
||||
await esbuild.build(await prepareTslibTreeshaking({
|
||||
...esmConfiguration,
|
||||
...bundleObjEntryPoints('lib', 'build/obj/index.js')
|
||||
}));
|
||||
|
|
@ -11,6 +11,8 @@ THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BA
|
|||
# This script runs from its own folder
|
||||
cd "$(dirname "$THIS_SCRIPT")"
|
||||
|
||||
BUNDLE_CMD="node $KEYMAN_ROOT/common/web/es-bundling/build/common-bundle.mjs"
|
||||
|
||||
################################ Main script ################################
|
||||
|
||||
builder_describe "Builds the gesture-recognition model for Web-based on-screen keyboards" \
|
||||
|
|
@ -47,7 +49,11 @@ fi
|
|||
if builder_start_action build:module; then
|
||||
# Build
|
||||
tsc --build $builder_verbose
|
||||
node build-bundler.js
|
||||
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/common/web/gesture-recognizer/build/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/common/web/gesture-recognizer/build/lib/index.mjs" \
|
||||
--format esm
|
||||
|
||||
builder_finish_action success build:module
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
import esbuild from 'esbuild';
|
||||
import { esmConfiguration, bundleObjEntryPoints } from '../es-bundling/build/index.mjs';
|
||||
|
||||
// Bundled ES module version
|
||||
await esbuild.build({
|
||||
...esmConfiguration,
|
||||
...bundleObjEntryPoints('lib', 'build/obj/index.js')
|
||||
});
|
||||
|
|
@ -15,6 +15,8 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
|||
# This script runs from its own folder
|
||||
cd "$THIS_SCRIPT_PATH"
|
||||
|
||||
BUNDLE_CMD="node $KEYMAN_ROOT/common/web/es-bundling/build/common-bundle.mjs"
|
||||
|
||||
################################ Main script ################################
|
||||
|
||||
builder_describe "Builds the standalone, headless form of Keyman Engine for Web's input-processor module" \
|
||||
|
|
@ -36,7 +38,10 @@ builder_parse "$@"
|
|||
|
||||
function do_build() {
|
||||
tsc -b ./tsconfig.json
|
||||
node build-bundler.js
|
||||
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/common/web/input-processor/build/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/common/web/input-processor/build/lib/index.mjs" \
|
||||
--format esm
|
||||
|
||||
# Declaration bundling.
|
||||
tsc --emitDeclarationOnly --outFile ./build/lib/index.d.ts
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
import esbuild from 'esbuild';
|
||||
import { esmConfiguration, bundleObjEntryPoints } from '../es-bundling/build/index.mjs';
|
||||
|
||||
// Bundled ES module version
|
||||
await esbuild.build({
|
||||
...esmConfiguration,
|
||||
...bundleObjEntryPoints('lib', 'build/obj/index.js')
|
||||
});
|
||||
|
|
@ -14,6 +14,8 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
|||
|
||||
cd "$THIS_SCRIPT_PATH"
|
||||
|
||||
BUNDLE_CMD="node $KEYMAN_ROOT/common/web/es-bundling/build/common-bundle.mjs"
|
||||
|
||||
################################ Main script ################################
|
||||
|
||||
builder_describe \
|
||||
|
|
@ -38,7 +40,9 @@ function do_build() {
|
|||
|
||||
# One of the functions (timedPromise) is quite helpful for automated testing, even in the DOM.
|
||||
# So, to make sure it's easily-accessible for the DOM-based tests...
|
||||
node build-bundler.js
|
||||
$BUNDLE_CMD "${KEYMAN_ROOT}/common/web/utils/build/obj/index.js" \
|
||||
--out "${KEYMAN_ROOT}/common/web/utils/build/lib/index.mjs" \
|
||||
--format esm
|
||||
}
|
||||
|
||||
function do_test() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue