feat(developer): kmc build command 🙀#8300
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
| mkdir -p "$THIS_SCRIPT_PATH/build/src/util/" | ||
| cp "$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard.schema.json" "$THIS_SCRIPT_PATH/build/src/util/" | ||
| cp "$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest.schema.json" "$THIS_SCRIPT_PATH/build/src/util/" | ||
| cp "$KEYMAN_ROOT/common/schemas/kvks/kvks.schema.json" "$THIS_SCRIPT_PATH/build/src/util/" |
There was a problem hiding this comment.
So... it seems like the files that the NodeCompilerCallbacks.ts module references need to be stored locally to the module itself?
I can understand needing a copy somewhere in the Developer build output - the files would need to get bundled with everything else for distribution, after all. Just... a small bit surprised they're not being located in build/resources or the like. Not that it's likely to be a major issue.
There was a problem hiding this comment.
I try to make the compiled output have the same file layout as the distribution. Fewer surprises.
There was a problem hiding this comment.
perhaps the resources should be a shared module.
| @@ -3,172 +3,44 @@ | |||
| * kmc - Keyman Next Generation Compiler | |||
There was a problem hiding this comment.
So... it looks like this file is mostly just split + abstracted to prepare for more complex subcommands?
Looks like the following files were spun off from this:
- activities/buildLdmlKeyboard.ts
- activities/buildTestData.ts
- commands/build.ts
- commands/buildTestData.ts
- util/NodeCompilerCallbacks.ts
I'm not quite fine-tooth-combing this, but it looks mostly like the same code as before, just reorganized.
Just figured I'd document that in case anyone else wants to review... and to confirm that I'm following the changes reasonably well.
There was a problem hiding this comment.
Yes, pretty much. The command line has changed to have a 'command' as the first parameter, in prep for future commands.
There was a problem hiding this comment.
yes, build and build-test-data were previously the default and a separate argument, respectively
226d343 to
91c6cb9
Compare
| mkdir -p "$THIS_SCRIPT_PATH/build/src/util/" | ||
| cp "$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard.schema.json" "$THIS_SCRIPT_PATH/build/src/util/" | ||
| cp "$KEYMAN_ROOT/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboardtest.schema.json" "$THIS_SCRIPT_PATH/build/src/util/" | ||
| cp "$KEYMAN_ROOT/common/schemas/kvks/kvks.schema.json" "$THIS_SCRIPT_PATH/build/src/util/" |
There was a problem hiding this comment.
perhaps the resources should be a shared module.
| import { NodeCompilerCallbacks } from '../util/NodeCompilerCallbacks.js'; | ||
|
|
||
| export function buildLdmlKeyboard(infile: string, options: any) { | ||
| // TODO-LDML: consider hardware vs touch -- touch-only layout will not have a .kvk |
There was a problem hiding this comment.
true at what layer do we want to expose that? I guess the kvk will just be null?
There was a problem hiding this comment.
Not sure at this point; I think it will come out in the wash as we work on that.
| @@ -3,172 +3,44 @@ | |||
| * kmc - Keyman Next Generation Compiler | |||
There was a problem hiding this comment.
yes, build and build-test-data were previously the default and a separate argument, respectively
|
looks great… one usage typo |
Co-authored-by: Steven R. Loomis <srl295@gmail.com>
@keymanapp-test-bot skip
Starts the refactor of
kmcto support thebuildcommand. In this PR, only supports building LDML keyboards. But infrastructure is in place to add different types of builds.I have moved
-Toption tobuild-test-datacommand for now. Not sure exactly how this fits, and even if it should be in kmc at all. But it'll do as a start.This file layout is intended to help keep options and commands under control and modular:
It's going to grow substantially!