Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(developer): remove .js output from LDML compiler #12432

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions developer/src/kmc-ldml/src/compiler/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { KmnCompiler } from '@keymanapp/kmc-kmn';
import { KMXPlusMetadataCompiler } from './metadata-compiler.js';
import { LdmlKeyboardVisualKeyboardCompiler } from './visual-keyboard-compiler.js';
import { LinterKeycaps } from './linter-keycaps.js';
//KMW17.0: import { LdmlKeyboardKeymanWebCompiler } from './keymanweb-compiler.js';

export const SECTION_COMPILERS = [
// These are in dependency order.
Expand Down Expand Up @@ -73,11 +72,6 @@ export interface LdmlKeyboardCompilerArtifacts extends KeymanCompilerArtifacts {
* desktop projects alongside .kmx
*/
kvk?: KeymanCompilerArtifactOptional;
/**
* Javascript keyboard filedata and filename - installable into KeymanWeb,
* Keyman mobile products
*/
js?: KeymanCompilerArtifactOptional;
};

export interface LdmlKeyboardCompilerResult extends KeymanCompilerResult {
Expand All @@ -90,7 +84,7 @@ export interface LdmlKeyboardCompilerResult extends KeymanCompilerResult {

/**
* @public
* Compiles a LDML keyboard .xml file to a .kmx (KMXPlus), .kvk, and/or .js. The
* Compiles a LDML keyboard .xml file to a .kmx (KMXPlus), .kvk. The
* compiler does not read or write from filesystem or network directly, but
* relies on callbacks for all external IO.
*/
Expand All @@ -116,7 +110,7 @@ export class LdmlKeyboardCompiler implements KeymanCompiler {
}

/**
* Compiles a LDML keyboard .xml file to .kmx, .kvk, and/or .js files. Returns
* Compiles a LDML keyboard .xml file to .kmx, .kvk files. Returns
* an object containing binary artifacts on success. The files are passed in
* by name, and the compiler will use callbacks as passed to the
* {@link LdmlKeyboardCompiler.init} function to read any input files by disk.
Expand Down Expand Up @@ -186,7 +180,6 @@ export class LdmlKeyboardCompiler implements KeymanCompiler {
artifacts: {
kmx: { data: kmxBinary, filename: outputFilename },
kvk: kvkBinary ? { data: kvkBinary, filename: outputFilename.replace(/\.kmx$/, '.kvk') } : null,
//KMW17.0: js: { data: kmw_binary, filename: outputFilename.replace(/\.kmx$/, '.js') },
}
};
}
Expand All @@ -197,7 +190,6 @@ export class LdmlKeyboardCompiler implements KeymanCompiler {
*
* - .kmx file - binary keyboard used by Keyman on desktop platforms
* - .kvk file - binary on screen keyboard used by Keyman on desktop platforms
* - .js file - Javascript keyboard for web and touch platforms
*
* @param artifacts - object containing artifact binary data to write out
* @returns true on success
Expand All @@ -211,10 +203,6 @@ export class LdmlKeyboardCompiler implements KeymanCompiler {
this.callbacks.fs.writeFileSync(artifacts.kvk.filename, artifacts.kvk.data);
}

if (artifacts.js) {
this.callbacks.fs.writeFileSync(artifacts.js.filename, artifacts.js.data);
}

return true;
}

Expand Down
Loading