mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-06 08:55:34 +00:00
Fixes the build for unit tests (and fixes corresponding bug in KMW build) to eliminate Lerna dependencies.
29 lines
1.1 KiB
Bash
Executable file
29 lines
1.1 KiB
Bash
Executable file
#! /bin/bash
|
|
#
|
|
# Compiles development-related KeymanWeb resources for use with developing/running tests.
|
|
# - the Recorder module (for engine tests)
|
|
# - the DOM module (for touch-alias and element-interface tests)
|
|
|
|
## START STANDARD BUILD SCRIPT INCLUDE
|
|
# adjust relative paths as necessary
|
|
THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")"
|
|
. "$(dirname "$THIS_SCRIPT")/../../resources/build/build-utils.sh"
|
|
. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh"
|
|
## END STANDARD BUILD SCRIPT INCLUDE
|
|
|
|
verify_npm_setup
|
|
|
|
ENGINE_TEST_OUTPUT="../unit_tests/"
|
|
readonly ENGINE_TEST_OUTPUT
|
|
|
|
# Ensures that we rely first upon the local npm-based install of Typescript.
|
|
# (Facilitates automated setup for build agents.)
|
|
PATH="../../node_modules/.bin:$PATH"
|
|
|
|
npm run tsc -- --build source/tsconfig.dev_resources.json
|
|
if [ $? -ne 0 ]; then
|
|
fail "Typescript compilation failed for 'dev_resources'."
|
|
fi
|
|
|
|
cat ../release/dev_resources/dev_resources.js <(echo) ../../common/web/lm-worker/build/index.js > "$ENGINE_TEST_OUTPUT/dev_resources.js"
|
|
cp ../release/dev_resources/dev_resources.js "$ENGINE_TEST_OUTPUT/dev_resources.js.map"
|