Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 committed Dec 20, 2024
1 parent e79e92c commit e9cba89
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions developer/src/vscode-plugin/src/kmcLdmlCompilerManager.mts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,36 @@
* Keyman is copyright (C) SIL Global. MIT License.
*/

// import { NodeCompilerCallbacks } from "@keymanapp/kmc";
import { NodeCompilerCallbacks } from "@keymanapp/kmc/build/src/util/NodeCompilerCallbacks.js";
import { LDMLCompilerManager } from "./ldmlCompilerManager.js";
import { CompilerCallbackOptions } from "@keymanapp/developer-utils";
import { LdmlCompilerOptions, LdmlKeyboardCompiler } from "@keymanapp/kmc-ldml";

/**
* TODO-LDML-EDITOR: should use vscode.workspace.fs.readFile which can read from remote workspaces.
*/

export class KmcLdmlManager implements LDMLCompilerManager {
calloptions?: CompilerCallbackOptions;
callbacks?: NodeCompilerCallbacks;
compoptions?: LdmlCompilerOptions;

async init(): Promise<any> {
console.log("Initting KmcLdmlManager…");
// new NodeCompilerCallbacks({
// });
this.calloptions = {
logLevel: "debug"
};
this.callbacks = new NodeCompilerCallbacks(this.calloptions);
console.log("KmcLdmlManager okay!");
const k = new LdmlKeyboardCompiler();
this.compoptions = {
readerOptions: {
importsPath: "/Users/srl295/src/cldr/keyboards/import/",
}
};
await k.init(this.callbacks, this.compoptions);
// await k.compile();
console.log('Initted');
}

};

0 comments on commit e9cba89

Please sign in to comment.