chore(common/lmlayer): requisite lerna-fu

This commit is contained in:
Eddie Antonio Santos 2020-05-04 10:53:57 -06:00
parent 00bffc6ce4
commit fd5bd1a70c
No known key found for this signature in database
GPG key ID: DD411EA4D9509D87
4 changed files with 15 additions and 18 deletions

View file

@ -7,13 +7,11 @@
set -eu
# Include some helper functions from resources
. ../../resources/shellHelperFunctions.sh
THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")"
KEYMAN_ROOT="$(dirname "$THIS_SCRIPT")/../.."
. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh"
EX_USAGE=64
# Where to find lexical model types.
LEXICAL_MODELS_TYPES=../../common/lexical-model-types
# Build the main script.
build () {
npm run build || fail "Could not build top-level JavaScript file."
@ -130,10 +128,7 @@ type npm >/dev/null ||\
fail "Build environment setup error detected! Please ensure Node.js is installed!"
if (( install_dependencies )) ; then
# Ensure that the local npm package can be require()'d.
(cd $LEXICAL_MODELS_TYPES && npm link .) || fail "Could not link lexical-model-types"
npm install || fail "Could not download dependencies."
verify_npm_setup true || fail "Could not setup dependencies."
fi
if [ -n "$publish_version" ]; then

View file

@ -12,7 +12,6 @@
"scripts": {
"build": "tsc",
"test": "mocha",
"install": "npm link @keymanapp/lexical-model-types",
"prepublishOnly": "npm run build"
},
"repository": {
@ -38,6 +37,7 @@
"node": ">=12.0.0"
},
"dependencies": {
"@keymanapp/lexical-model-types": "^0.0.0",
"commander": "^3.0.0",
"typescript": "^3.2.4",
"xml2js": "^0.4.19"
@ -47,6 +47,7 @@
"@types/mocha": "^5.2.7",
"@types/node": "^10.14.6",
"@types/xml2js": "^0.4.5",
"@keymanapp/lexical-model-layer": "^14.0.0",
"chai": "^4.2.0",
"chalk": "^2.4.2",
"jszip": "^2.5.0",

View file

@ -13,18 +13,18 @@ describe('The join word breaker decorator', function () {
const TEST_CASES: [string, string[], string[], string[]][] = [
/* input, joiners, default breaks, breaks with joins */
// Original test case from https://github.com/keymanapp/keyman/issues/2753
['khui-chhùi', ['-'], ["khui", "-", "chhùi"], ["khui-chhùi"]],
['khui-chhùi', ['-'], ["khui", "-", "chhùi"], ["khui-chhùi"]],
// Plains Cree SRO:
// Plains Cree SRO:
['ê-kotiskâwêyâhk', ['-'], ['ê', '-', 'kotiskâwêyâhk'], ['ê-kotiskâwêyâhk']],
// Edge cases:
// Joiner alone:
['-', ['-'], ['-'], ['-']],
// Joiner at the end:
// Joiner at the end:
['ni-', ['-'], ['ni', '-'], ['ni-']],
// Joiner at the end:
// Joiner at the end:
['-ân', ['-'], ['-', 'ân'], ['-ân']],
// This was my guiding test case:
@ -45,8 +45,8 @@ describe('The join word breaker decorator', function () {
["Email", ":", "no", "-", "body", "@", "example.com"],
["Email", ":", "no-body@example.com"]
],
// Joining with two or more joiners in a row
// Joining with two or more joiners in a row
[
"nobody@@example.com",
["@"],
@ -96,4 +96,4 @@ describe('The join word breaker decorator', function () {
function onlyText(span: Span) {
return span.text;
}
});
});

View file

@ -4,7 +4,8 @@
"common/core/web/keyboard-processor",
"common/predictive-text",
"common/lexical-model-types",
"web"
"web",
"developer/js"
],
"version": "14.0.0"
}