diff --git a/common/predictive-text/build.sh b/common/predictive-text/build.sh index 5a0685c180..b9c7258f9d 100755 --- a/common/predictive-text/build.sh +++ b/common/predictive-text/build.sh @@ -24,13 +24,6 @@ build-worker () { npm run tsc -- -p ./worker/tsconfig.json || fail "Could not build worker." } -# Creates embedded_worker.js. Must be run after the worker is built for the -# first time -wrap-worker ( ) { - echo "> wrap-worker-code LMLayerWorkerCode ./worker/index.js > ${EMBEDDED_WORKER}" - wrap-worker-code LMLayerWorkerCode ./worker/index.js > "${EMBEDDED_WORKER}" -} - # A nice, extensible method for -clean operations. Add to this as necessary. clean ( ) { rm -f "${EMBEDDED_WORKER}" @@ -68,6 +61,13 @@ unit-test ( ) { npm run mocha -- --recursive ./unit_tests/headless/*.js } +# Creates embedded_worker.js. Must be run after the worker is built for the +# first time +wrap-worker ( ) { + echo "> wrap-worker-code LMLayerWorkerCode ./worker/index.js > ${EMBEDDED_WORKER}" + wrap-worker-code LMLayerWorkerCode ./worker/index.js > "${EMBEDDED_WORKER}" +} + # Wraps JavaScript code in a way that can be embedded in a worker. # To get the inner source code, include the file generated by this function, # then use name.toString() where `name` is the name passed into this