Commit graph

100 commits

Author SHA1 Message Date
Joshua A. Horton
df2436b5c4 change(web): converts most of lower-level Web module scripts 2023-12-18 10:08:07 +07:00
Joshua A. Horton
a92f915e60 chore(web): Merge branch 'chore/web/cleanup-kmw-headless-module-builds' into chore/web/esbuild-config-cleanup 2023-06-16 12:47:20 +07:00
Joshua A. Horton
569662237e fix(web): build.sh dependency on the centralized bundling stuff 2023-06-16 11:36:03 +07:00
Joshua A. Horton
194139be03 chore(web): paren spacing cleanup 2023-06-15 15:49:38 +07:00
Joshua A. Horton
6e8432383b chore(web): applies bulk of review suggestions 2023-06-15 15:48:53 +07:00
Joshua A. Horton
cb2029bf49 chore(web): cleanup for purely-headless KMW main-thread-module build scripts, esbuild configs 2023-06-14 15:37:30 +07:00
Joshua A. Horton
22ae456e0a fix(common/models): prior commit(s) broke npm run tsc 2023-06-14 15:14:40 +07:00
Joshua A. Horton
e318c5cb9c chore(web): build dependency links 2023-06-08 13:03:26 +07:00
Joshua A. Horton
f7d082981c chore: Merge branch 'master' into chore/feature-esmodule-master-update 2023-03-14 11:51:57 +07:00
Joshua A. Horton
f5e64a10a5 chore: Merge branch 'chore/common/ldml-ts-and-node-updates' into chore/feature-esmodule-master-update 2023-03-14 09:23:39 +07:00
Marc Durdin
92ed99c4d6 chore(common): build script performance improvements
Improves build script performance by:
* using built-ins wherever possible (e.g. string splitting)
* eliminating redundant code
* using absolute (to $KEYMAN_ROOT) rather than relative paths to avoid realpath
* removing unnecessary `npm run` calls

BEFORE                         | AFTER
-------------------------------|----------------------
time ./core/build.sh --help    |
real    0m2.116s               | real    0m0.874s
user    0m0.578s               | user    0m0.198s
sys     0m0.984s               | sys     0m0.289s
-------------------------------|----------------------
time ./web/build.sh --help     |
real    0m3.523s               | real    0m0.757s
user    0m1.166s               | user    0m0.320s
sys     0m2.273s               | sys     0m0.455s
-------------------------------|----------------------
time ./web/build.sh -d         |
real    1m34.750s              | real    0m59.974s
user    0m9.721s               | user    0m6.284s
sys     0m19.652s              | sys     0m13.202s

@keymanapp-test-bot skip
2023-03-13 07:18:09 +07:00
Marc Durdin
ce864ea923 chore: update standard script prolog to use builtin instead of dirname 2023-02-22 11:04:15 +07:00
Marc Durdin
463c7ff907 chore: remove greadlink from standard script prolog 2023-02-22 10:43:06 +07:00
Joshua A. Horton
6af1e4890e chore(web): Merge branch 'feature-esmodule-web-engine' into chore/web/feature-esmodule-update 2023-02-16 15:18:50 +07:00
Marc Durdin
4598f13ba8 chore(common): automatically apply _builder_check_color 2023-02-09 12:12:18 +07:00
Marc Durdin
983ae43357 chore(common): add builder_term function 2023-02-08 12:49:54 +07:00
Joshua A. Horton
e1743a34c1 fix(common/models): predictive-text describe_outputs 2023-01-20 14:51:42 +07:00
Joshua A. Horton
00d0ef36a2 fix(common/models): lm-layer unit tests now operational again. Not elegant, but it works 2023-01-20 13:48:58 +07:00
Joshua A. Horton
a05473ffad change(common/models): baseline es module conversion of lm-layer 2023-01-20 13:48:53 +07:00
Joshua A. Horton
e54cbff712 docs(common/models): minor pred-text build.sh comment tweak 2023-01-20 13:37:45 +07:00
Joshua A. Horton
d01dbd93ae chore(common/models): minor dependency reorder 2023-01-20 13:37:44 +07:00
Joshua A. Horton
87f6f57848 feat(common/models): adds models/templates build.sh 2023-01-20 13:37:43 +07:00
Joshua A. Horton
06e01213e1 feat(web): adds word-breaker build.sh 2023-01-20 13:26:11 +07:00
Joshua A. Horton
4a96cdb0cb chore(web): cleanup per PR review 2022-11-30 15:35:18 +07:00
Joshua A. Horton
d692166e7d chore(web): fixes nested dependency/configures 2022-10-18 13:14:29 +07:00
Marc Durdin
986544c778 feat(common): builder script dependency and legacy script report
Adds /resources/build/builder-report.sh, internal maintenance script for
tracking build dependency tree and remaining legacy build.sh scripts.

@keymanapp-test-bot skip
2022-10-14 07:54:00 +11:00
Marc Durdin
318058478b
Merge branch 'master' into chore/common/builder-tweaks 2022-10-13 13:30:13 +11:00
Marc Durdin
57f305666e
Update build.sh 2022-10-13 12:02:07 +11:00
Marc Durdin
d89c63aaf3
Update common/predictive-text/build.sh
Co-authored-by: Joshua Horton <joshua_horton@sil.org>
2022-10-13 06:04:14 +11:00
Marc Durdin
b7000f5b7f chore(common): builder_start_action wildcard support 2022-10-12 13:28:37 +11:00
Marc Durdin
30121d9793 chore(common): remove space for builder_..._action param 2022-10-12 13:28:37 +11:00
Marc Durdin
1cecb87f7f feat(common): builder dependency support 2022-10-12 12:50:26 +11:00
Joshua A. Horton
e347aeabfe chore(common/models): minor tweaks per review 2022-10-05 09:04:23 +07:00
Joshua A. Horton
d97b1eba3c fix(common/models): pred-text build.sh ignored --ci option 2022-10-04 09:20:42 +07:00
Joshua A. Horton
4176605c37 chore(common/models): script doc tweak 2022-10-03 14:04:48 +07:00
Joshua A. Horton
dd9d773720 chore(common/models): lmlayer build.sh now builder-based 2022-10-03 12:45:23 +07:00
Marc Durdin
767927bf16 chore(common): use /usr/bin/env bash
Fixes up scripts (except under /linux) to use `#!/usr/bin/env bash`
instead of `#!/bin/bash` or `#!/bin/sh` so that we don't end up with
the ancient version of bash supplied with macOS.

This became urgent with this PR, because of bash-4.xisms in
build-utils.sh, for example on line 572:

```
if [[ -v _builder_params[$e] ]]; then
```
2022-07-25 14:59:37 +10:00
jahorton
ea74a7f2ce chore(web): adds direct keyman-version compile to many build.sh's 2022-05-24 10:11:57 +07:00
jahorton
f20759f26a chore(web): eliminates web-environment package 2022-05-23 13:40:29 +07:00
Marc Durdin
af44c0687f chore(web): move web-environment to common/web 2022-05-16 08:29:46 +10:00
Marc Durdin
77ed80e567 chore(web): build lm-worker in predictive-text 2022-05-13 14:28:40 +10:00
Marc Durdin
78427b374f chore(web): build deps for predictive-text 2022-05-12 06:29:41 +10:00
Marc Durdin
2f2d3c72c9 chore(web): move lm-worker into its own folder
This starts the reorg required for splitting the lm worker into its own
module. Tests are still not working. But builds are going.

Some decisions to be made around the final path for wrapping of the
code. I think it may be possible to do something a whole lot more
elegant by moving the wrapping process into the KMW build and leaving
the LM Worker output as a pure tsc output -- given only KMW wants the
wrapped worker anyway (tests aside). The actual wrapping code could
still be in the lm-worker folder.
2022-04-14 15:33:23 +10:00
Marc Durdin
4d94786852 chore(web): replace lerna with npm workspaces and ts projects
Fixes #6320.

Part 1 of moving from lerna to a simpler, maintained monorepo solution,
using TypeScript Projects and NPM Workspaces.

There is more work to be done here. At this point, KeymanWeb builds and
runs without errors, but the built file is substantially different,
mostly in include order.

Using TypeScript Projects, we move away from the need to run build
scripts in various locations for almost all the Typescript modules.

TODO: Embedded versions and tests have not been verified.

TODO: developer/server is not yet verified.

TODO: developer/js (needs a rename!) is not yet verified.

TODO: Currently, the predictive-text folder needs refactoring to move
the construction of the worker wrapper out of the Predictive Text build
and into the final assembly of keymanweb.js (as it should be valid to
run it as a separate .js anyway).

TODO: Most of the `<reference>` paths need to be re-verified. Ideally
there should be no references outside the current module for any given
.ts.

TODO: The embedded vs browser vs node (headless) builds should be tidied
up for consistency so that it's obvious what depends on what. This is
currently messiest in the predictive-text folder, where the output names
diverge from the filenames and the various files are mixed in the same
folder (as evidenced by the exclusions listed in each tsconfig.json).

TODO: `npm install` should be removed from most build scripts and
instead `npm ci` (#6196) should be run only once from the top-level
folder for any given build. I've had eliminated side-effects from the
`install` action for npm, which makes it easier to reason about state.

TODO: verify_npm_setup and related functions can probably be eliminated.

TODO: most of the build scripts should be largely eliminated for web.

TODO: several ts projects use inconsistent output folders.

TODO: it may be possible to generate a .d.ts for models/types so that
we can use a consistent reference for those as well.

TODO: build.sh, tsconfig.json should always be in the module's top-level
folder, not in a subfolder such as src (e.g. see input-processor/src,
keyboard-processor/src, web/source).

TODO: resources/web-environment should be in common/web.

TODO: other js node_modules imports should be wrapped like es6-shim.

TODO: fix up the publish code for npm modules

TODO: eliminate version numbers from package.json if possible?

Whew, that's most of the stuff I noticed!
2022-04-12 21:02:33 +10:00
jahorton
22ac71540b chore(common/models): adds a naive... semi-fill?... for String.normalize for old devices 2020-12-14 09:26:36 +07:00
jahorton
c9429230c7 fix(common/models): Old Android API compat 2020-09-22 10:36:42 +07:00
Eddie Antonio Santos
986e427f2d
fix(common/models): remove unnecessary build invocation 2020-05-20 16:27:27 -06:00
Eddie Antonio Santos
8df4948e68
chore(common/lmlayer): let modeling layer depend on new models-types package 2020-05-19 19:35:09 -06:00
jahorton
f59778733f fix(common/lmlayer): adds web-utils build step to lmlayer build 2020-05-15 15:59:51 +07:00
jahorton
40b0b2005f fix(web/engine): fixes bad implementation of -S shorthand 2020-04-29 16:15:57 +07:00