mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-28 19:27:44 +00:00
Fixes #3199. Ensures that the model package compiler passes schema validation for kmp.json. Three problems were corrected: 1. `followKeyboardVersion` is a source-only property; it should not be in deployable kmp.json. 2. `copyLocation` should have been a number not a string (in XML everything is a string... but JSON has more control here) 3. `fileType` is a source-only property; it also should not be in deployable kmp.json. I have checked that the resulting files validate against the package kmp.json schema version 1.1.0 defined at https://github.com/keymanapp/api.keyman.com/blob/master/schemas/package/1.1.0/package.json. None of these fixes should impact the use of these packages in target apps. `followKeyboardVersion` and `fileType` are used only in the source at package development time, and `copyLocation` is unused (and should be eliminated from Keyman altogether in the future). |
||
|---|---|---|
| .. | ||
| libexec | ||
| source | ||
| tests | ||
| .gitignore | ||
| .npmignore | ||
| build.sh | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Keyman Developer
This package provides the following Keyman command line tools:
kmlmc— takes lexical model sources and compiles them in to a .js file.kmlmp— uses a.model.kmpfile to generate a redistributable lexical model package.kmlmi— merges Keyman lexical model.model_infofiles.
kmlmc is intended to be used standalone, or as part of a build system.
kmlmp is used only by command line tools. kmlmi is used exclusively
in the lexical-models repository.
In order to build lexical models, these tools must be built and compiled.
Install
Install kmlmc, kmlmp, and kmlmi globally:
npm install -g @keymanapp/lexical-model-compiler
Usage
To compile a lexical model from its .model.ts source, use kmlmc:
kmlmc my-lexical-model.model.ts --outFile my-lexical-model.js
To see more command line options by using the --help option:
kmlmc --help
kmlmp --help
kmlmi --help
How to build from source
Run build.sh:
./build.sh
How to run the tests
./build.sh -test