Merge pull request #1837 from keymanapp/web-update-trie

[LMLayer][Web] Automatically copy trie from common/predictive-text to web/ in web UI build.
This commit is contained in:
Eddie Antonio Santos 2019-06-20 09:22:32 -06:00 • committed by GitHub
commit aee00874cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -46,14 +46,21 @@ EMBED_TARGET=( "keyman.js" )
echo "Node.js + dependencies check"
npm install --no-optional
# Variables for the LMLayer
PREDICTIVE_TEXT_SOURCE="../../common/predictive-text/unit_tests/in_browser/resources/models/simple-trie.js"
PREDICTIVE_TEXT_OUTPUT="../testing/prediction-ui/simple-en-trie.js"
# Ensure that the LMLayer compiles properly, readying the build product for comsumption by KMW.
cd ../../common/predictive-text/
echo ""
echo "Compiling the Language Modeling layer module..."
./build.sh || fail "Failed to compile the language modeling layer module."
cd ../../web/source
echo "Copying ${PREDICTIVE_TEXT_SOURCE} to ${PREDICTIVE_TEXT_OUTPUT}"
cp "${PREDICTIVE_TEXT_SOURCE}" "${PREDICTIVE_TEXT_OUTPUT}" || fail "Failed to copy predictive text model"
echo "Language Modeling layer compilation successful."
echo ""
cd ../../web/source
if [ $? -ne 0 ]; then
fail "Build environment setup error detected! Please ensure Node.js is installed!"

File diff suppressed because one or more lines are too long