@keymanapp/kmc-generate 18.0.138-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/abstract-generator.d.ts +167 -0
- package/build/src/abstract-generator.d.ts.map +1 -0
- package/build/src/abstract-generator.js +137 -0
- package/build/src/abstract-generator.js.map +1 -0
- package/build/src/basic-generator.d.ts +34 -0
- package/build/src/basic-generator.d.ts.map +1 -0
- package/build/src/basic-generator.js +119 -0
- package/build/src/basic-generator.js.map +1 -0
- package/build/src/generator-messages.d.ts +33 -0
- package/build/src/generator-messages.d.ts.map +1 -0
- package/build/src/generator-messages.js +34 -0
- package/build/src/generator-messages.js.map +1 -0
- package/build/src/keyman-keyboard-generator.d.ts +32 -0
- package/build/src/keyman-keyboard-generator.d.ts.map +1 -0
- package/build/src/keyman-keyboard-generator.js +89 -0
- package/build/src/keyman-keyboard-generator.js.map +1 -0
- package/build/src/ldml-keyboard-generator.d.ts +25 -0
- package/build/src/ldml-keyboard-generator.d.ts.map +1 -0
- package/build/src/ldml-keyboard-generator.js +52 -0
- package/build/src/ldml-keyboard-generator.js.map +1 -0
- package/build/src/lexical-model-generator.d.ts +25 -0
- package/build/src/lexical-model-generator.d.ts.map +1 -0
- package/build/src/lexical-model-generator.js +50 -0
- package/build/src/lexical-model-generator.js.map +1 -0
- package/build/src/main.d.ts +6 -0
- package/build/src/main.d.ts.map +1 -0
- package/build/src/main.js +10 -0
- package/build/src/main.js.map +1 -0
- package/build/src/template/kmn-keyboard/HISTORY.md +6 -0
- package/build/src/template/kmn-keyboard/LICENSE.md +21 -0
- package/build/src/template/kmn-keyboard/README.md +18 -0
- package/build/src/template/kmn-keyboard/keyboard.kpj +8 -0
- package/build/src/template/kmn-keyboard/source/keyboard.keyman-touch-layout +655 -0
- package/build/src/template/kmn-keyboard/source/keyboard.kmn +14 -0
- package/build/src/template/kmn-keyboard/source/keyboard.kps +47 -0
- package/build/src/template/kmn-keyboard/source/keyboard.kvks +8 -0
- package/build/src/template/kmn-keyboard/source/readme.htm +24 -0
- package/build/src/template/kmn-keyboard/source/welcome.htm +26 -0
- package/build/src/template/ldml-keyboard/HISTORY.md +6 -0
- package/build/src/template/ldml-keyboard/LICENSE.md +21 -0
- package/build/src/template/ldml-keyboard/README.md +18 -0
- package/build/src/template/ldml-keyboard/keyboard.kpj +8 -0
- package/build/src/template/ldml-keyboard/source/keyboard.kps +44 -0
- package/build/src/template/ldml-keyboard/source/keyboard.xml +40 -0
- package/build/src/template/ldml-keyboard/source/readme.htm +24 -0
- package/build/src/template/ldml-keyboard/source/welcome.htm +26 -0
- package/build/src/template/wordlist-lexical-model/HISTORY.md +6 -0
- package/build/src/template/wordlist-lexical-model/LICENSE.md +21 -0
- package/build/src/template/wordlist-lexical-model/README.md +17 -0
- package/build/src/template/wordlist-lexical-model/model.kpj +10 -0
- package/build/src/template/wordlist-lexical-model/source/model.kps +42 -0
- package/build/src/template/wordlist-lexical-model/source/model.ts +14 -0
- package/build/src/template/wordlist-lexical-model/source/readme.htm +24 -0
- package/build/src/template/wordlist-lexical-model/source/welcome.htm +28 -0
- package/build/src/template/wordlist-lexical-model/source/wordlist.tsv +16 -0
- package/package.json +65 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { CompilerCallbacks, CompilerLogLevel, KeymanCompilerArtifact, KeymanCompilerArtifacts, KeymanCompilerResult } from "@keymanapp/developer-utils";
|
|
2
|
+
import { KeymanTargets } from "@keymanapp/common-types";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
* Options for the Keyman Developer project generator
|
|
6
|
+
*/
|
|
7
|
+
export interface GeneratorOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Reporting level to console, used by NodeCompilerCallbacks (not used in
|
|
10
|
+
* compiler modules; all messages are still reported to the internal log)
|
|
11
|
+
*/
|
|
12
|
+
logLevel?: CompilerLogLevel;
|
|
13
|
+
/**
|
|
14
|
+
* identifier (basename) of the keyboard or model
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* supported platforms, only used in Keyman keyboard project generator
|
|
19
|
+
*/
|
|
20
|
+
targets?: KeymanTargets.KeymanTarget[];
|
|
21
|
+
/**
|
|
22
|
+
* output path where project folder will be created
|
|
23
|
+
*/
|
|
24
|
+
outPath: string;
|
|
25
|
+
/**
|
|
26
|
+
* descriptive name of the keyboard or lexical model
|
|
27
|
+
*/
|
|
28
|
+
name?: string;
|
|
29
|
+
/**
|
|
30
|
+
* name of the copyright holder for the keyboard or lexical model (do not
|
|
31
|
+
* include (c) symbol or date)
|
|
32
|
+
*/
|
|
33
|
+
copyright?: string;
|
|
34
|
+
/**
|
|
35
|
+
* version of the keyboard or model, 1.0 default for Keyman keyboard, lexical
|
|
36
|
+
* model, 1.0.0 default for LDML keyboard
|
|
37
|
+
*/
|
|
38
|
+
version?: string;
|
|
39
|
+
/**
|
|
40
|
+
* array of bcp 47 tags which are supported by the keyboard or lexical model
|
|
41
|
+
*/
|
|
42
|
+
languageTags?: string[];
|
|
43
|
+
/**
|
|
44
|
+
* name of the author of the keyboard
|
|
45
|
+
*/
|
|
46
|
+
author?: string;
|
|
47
|
+
/**
|
|
48
|
+
* set to true to generate an icon for a Keyman keyboard with the first
|
|
49
|
+
* characters of the first specified BCP 47 tag
|
|
50
|
+
*/
|
|
51
|
+
icon?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* description of the keyboard, Markdown permissible
|
|
54
|
+
*/
|
|
55
|
+
description?: string;
|
|
56
|
+
/**
|
|
57
|
+
* version of Keyman to reference in source files, defaults to KEYMAN_VERSION.VERSION
|
|
58
|
+
*/
|
|
59
|
+
keymanVersion?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @public
|
|
63
|
+
* Internal in-memory build artifacts from a successful generation
|
|
64
|
+
*/
|
|
65
|
+
export interface GeneratorArtifacts extends KeymanCompilerArtifacts {
|
|
66
|
+
/**
|
|
67
|
+
* The target path for the generation, equal to the normalized output path.
|
|
68
|
+
* This folder must not exist before `write()`. This pattern is used to avoid
|
|
69
|
+
* name collisions with other artifacts
|
|
70
|
+
*/
|
|
71
|
+
['kmc-generate:outputPath']: KeymanCompilerArtifact;
|
|
72
|
+
/**
|
|
73
|
+
* Generated project files to be written to disk
|
|
74
|
+
*/
|
|
75
|
+
[name: string]: KeymanCompilerArtifact;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @public
|
|
79
|
+
* Result of a successful generation
|
|
80
|
+
*/
|
|
81
|
+
export interface GeneratorResult extends KeymanCompilerResult {
|
|
82
|
+
/**
|
|
83
|
+
* Internal in-memory build artifacts from a successful compilation. Caller
|
|
84
|
+
* can write these to disk with {@link AbstractGenerator.write}
|
|
85
|
+
*/
|
|
86
|
+
artifacts: GeneratorArtifacts;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* @public
|
|
90
|
+
* Common functionality for generating projects. Do not instantiate
|
|
91
|
+
* this class, rather instantiate a subclass
|
|
92
|
+
*/
|
|
93
|
+
export declare class AbstractGenerator {
|
|
94
|
+
/**
|
|
95
|
+
* id for the keyboard or model, aka the basename sans extension, foldername
|
|
96
|
+
* for the project
|
|
97
|
+
*/
|
|
98
|
+
/**
|
|
99
|
+
* extension of options.copyright including copyright year
|
|
100
|
+
*/
|
|
101
|
+
protected fullCopyright: string;
|
|
102
|
+
/**
|
|
103
|
+
* identifiers for lines to include when transforming template files, filled
|
|
104
|
+
* by child classes
|
|
105
|
+
*/
|
|
106
|
+
protected get includedPrefixes(): string[];
|
|
107
|
+
private _includedPrefixes;
|
|
108
|
+
/**
|
|
109
|
+
* tokens to rewrite in output files
|
|
110
|
+
*/
|
|
111
|
+
protected get tokenMap(): {
|
|
112
|
+
[index: string]: string;
|
|
113
|
+
};
|
|
114
|
+
private _tokenMap;
|
|
115
|
+
/**
|
|
116
|
+
* map of all files to be transformed, filled by this class and subclasses
|
|
117
|
+
*/
|
|
118
|
+
protected get filenameMap(): {
|
|
119
|
+
[index: string]: string;
|
|
120
|
+
};
|
|
121
|
+
private _filenameMap;
|
|
122
|
+
/**
|
|
123
|
+
* base path for template files in this module
|
|
124
|
+
*/
|
|
125
|
+
protected get templateBasePath(): string;
|
|
126
|
+
private _templateBasePath;
|
|
127
|
+
protected static readonly SPath_Source = "source/";
|
|
128
|
+
protected static readonly SFile_WelcomeHTM: string;
|
|
129
|
+
protected static readonly SFile_ReadmeHTM: string;
|
|
130
|
+
protected static readonly SFile_HistoryMD = "HISTORY.md";
|
|
131
|
+
protected static readonly SFile_LicenseMD = "LICENSE.md";
|
|
132
|
+
protected static readonly SFile_ReadmeMD = "README.md";
|
|
133
|
+
protected static readonly SFile_GitIgnore = ".gitignore";
|
|
134
|
+
protected get callbacks(): CompilerCallbacks;
|
|
135
|
+
private _callbacks;
|
|
136
|
+
protected get options(): GeneratorOptions;
|
|
137
|
+
private _options;
|
|
138
|
+
/**
|
|
139
|
+
* Initialize the generator. Copies options.
|
|
140
|
+
* @param callbacks - Callbacks for external interfaces, including message
|
|
141
|
+
* reporting and file io
|
|
142
|
+
* @param options - Generator options
|
|
143
|
+
* @returns false if initialization fails
|
|
144
|
+
*/
|
|
145
|
+
init(callbacks: CompilerCallbacks, options: GeneratorOptions): Promise<boolean>;
|
|
146
|
+
/**
|
|
147
|
+
* Write artifacts from a successful compile to disk, via callbacks methods.
|
|
148
|
+
* The artifacts written will include all files from the project, across
|
|
149
|
+
* multiple folders. Folders will be created as needed
|
|
150
|
+
*
|
|
151
|
+
* @param artifacts - object containing artifact binary data to write out
|
|
152
|
+
* @returns true on success
|
|
153
|
+
*/
|
|
154
|
+
write(artifacts: GeneratorArtifacts): Promise<boolean>;
|
|
155
|
+
/**
|
|
156
|
+
* Fills in the artifact outputPath used by all generators
|
|
157
|
+
* @returns
|
|
158
|
+
*/
|
|
159
|
+
protected defaultArtifacts(): GeneratorArtifacts;
|
|
160
|
+
/**
|
|
161
|
+
* @internal
|
|
162
|
+
*/
|
|
163
|
+
get test_tokenMap(): {
|
|
164
|
+
[index: string]: string;
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=abstract-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-generator.d.ts","sourceRoot":"","sources":["../../src/abstract-generator.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAExJ,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,YAAY,EAAE,CAAC;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,uBAAuB;IACjE;;;;OAIG;IACH,CAAC,yBAAyB,CAAC,EAAE,sBAAsB,CAAC;IACpD;;OAEG;IACH,CAAC,IAAI,EAAC,MAAM,GAAG,sBAAsB,CAAC;CACvC;AAED;;;GAGG;AACH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BAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;IA8BnE;;;OAGG;IACH,SAAS,CAAC,gBAAgB,IAAI,kBAAkB;IAShD;;OAEG;IACH,IAAW,aAAa;;MAA6B;CACtD"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Keyman is copyright (C) SIL International. MIT License.
|
|
3
|
+
*
|
|
4
|
+
* Base interfaces and classes for generating Keyman Developer source files
|
|
5
|
+
*/
|
|
6
|
+
import { GeneratorMessages } from './generator-messages.js';
|
|
7
|
+
;
|
|
8
|
+
;
|
|
9
|
+
;
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
* Common functionality for generating projects. Do not instantiate
|
|
13
|
+
* this class, rather instantiate a subclass
|
|
14
|
+
*/
|
|
15
|
+
export class AbstractGenerator {
|
|
16
|
+
/**
|
|
17
|
+
* id for the keyboard or model, aka the basename sans extension, foldername
|
|
18
|
+
* for the project
|
|
19
|
+
*/
|
|
20
|
+
// protected get id() { return this._id }
|
|
21
|
+
// private _id: string;
|
|
22
|
+
/**
|
|
23
|
+
* extension of options.copyright including copyright year
|
|
24
|
+
*/
|
|
25
|
+
fullCopyright = '';
|
|
26
|
+
/**
|
|
27
|
+
* identifiers for lines to include when transforming template files, filled
|
|
28
|
+
* by child classes
|
|
29
|
+
*/
|
|
30
|
+
get includedPrefixes() { return this._includedPrefixes; }
|
|
31
|
+
_includedPrefixes;
|
|
32
|
+
/**
|
|
33
|
+
* tokens to rewrite in output files
|
|
34
|
+
*/
|
|
35
|
+
get tokenMap() { return this._tokenMap; }
|
|
36
|
+
_tokenMap;
|
|
37
|
+
/**
|
|
38
|
+
* map of all files to be transformed, filled by this class and subclasses
|
|
39
|
+
*/
|
|
40
|
+
get filenameMap() { return this._filenameMap; }
|
|
41
|
+
_filenameMap;
|
|
42
|
+
/**
|
|
43
|
+
* base path for template files in this module
|
|
44
|
+
*/
|
|
45
|
+
get templateBasePath() { return this._templateBasePath; }
|
|
46
|
+
_templateBasePath;
|
|
47
|
+
static SPath_Source = 'source/';
|
|
48
|
+
static SFile_WelcomeHTM = `${this.SPath_Source}welcome.htm`;
|
|
49
|
+
static SFile_ReadmeHTM = `${this.SPath_Source}readme.htm`;
|
|
50
|
+
static SFile_HistoryMD = 'HISTORY.md';
|
|
51
|
+
static SFile_LicenseMD = 'LICENSE.md';
|
|
52
|
+
static SFile_ReadmeMD = 'README.md';
|
|
53
|
+
static SFile_GitIgnore = '.gitignore';
|
|
54
|
+
get callbacks() { return this._callbacks; }
|
|
55
|
+
_callbacks;
|
|
56
|
+
get options() { return this._options; }
|
|
57
|
+
_options;
|
|
58
|
+
/**
|
|
59
|
+
* Initialize the generator. Copies options.
|
|
60
|
+
* @param callbacks - Callbacks for external interfaces, including message
|
|
61
|
+
* reporting and file io
|
|
62
|
+
* @param options - Generator options
|
|
63
|
+
* @returns false if initialization fails
|
|
64
|
+
*/
|
|
65
|
+
async init(callbacks, options) {
|
|
66
|
+
this._callbacks = callbacks;
|
|
67
|
+
this._options = { ...options };
|
|
68
|
+
// this._id = options.id;
|
|
69
|
+
this._includedPrefixes = [];
|
|
70
|
+
this._filenameMap = {};
|
|
71
|
+
this._tokenMap = {};
|
|
72
|
+
this._templateBasePath = this.callbacks.path.join(this.callbacks.path.dirname(this.callbacks.fileURLToPath(import.meta.url)), 'template');
|
|
73
|
+
// These files are currently always included, for all project types
|
|
74
|
+
this.filenameMap[AbstractGenerator.SFile_WelcomeHTM] = AbstractGenerator.SFile_WelcomeHTM;
|
|
75
|
+
this.filenameMap[AbstractGenerator.SFile_ReadmeHTM] = AbstractGenerator.SFile_ReadmeHTM;
|
|
76
|
+
this.filenameMap[AbstractGenerator.SFile_HistoryMD] = AbstractGenerator.SFile_HistoryMD;
|
|
77
|
+
this.filenameMap[AbstractGenerator.SFile_LicenseMD] = AbstractGenerator.SFile_LicenseMD;
|
|
78
|
+
this.filenameMap[AbstractGenerator.SFile_ReadmeMD] = AbstractGenerator.SFile_ReadmeMD;
|
|
79
|
+
this.filenameMap[AbstractGenerator.SFile_GitIgnore] = AbstractGenerator.SFile_GitIgnore;
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Write artifacts from a successful compile to disk, via callbacks methods.
|
|
84
|
+
* The artifacts written will include all files from the project, across
|
|
85
|
+
* multiple folders. Folders will be created as needed
|
|
86
|
+
*
|
|
87
|
+
* @param artifacts - object containing artifact binary data to write out
|
|
88
|
+
* @returns true on success
|
|
89
|
+
*/
|
|
90
|
+
async write(artifacts) {
|
|
91
|
+
if (this.callbacks.fs.existsSync(artifacts["kmc-generate:outputPath"].filename)) {
|
|
92
|
+
this.callbacks.reportMessage(GeneratorMessages.Error_OutputPathAlreadyExists({ outPath: artifacts["kmc-generate:outputPath"].filename }));
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
for (const key of Object.keys(artifacts)) {
|
|
96
|
+
const a = artifacts[key];
|
|
97
|
+
if (key == "kmc-generate:outputPath") {
|
|
98
|
+
// metadata, skip this
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const path = this.callbacks.path.dirname(a.filename);
|
|
102
|
+
try {
|
|
103
|
+
this.callbacks.fs.mkdirSync(path, { recursive: true });
|
|
104
|
+
/* c8 ignore next 4 */
|
|
105
|
+
}
|
|
106
|
+
catch (e) {
|
|
107
|
+
this.callbacks.reportMessage(GeneratorMessages.Error_CannotCreateFolder({ folderName: path, e }));
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
try {
|
|
111
|
+
this.callbacks.fs.writeFileSync(a.filename, a.data);
|
|
112
|
+
}
|
|
113
|
+
catch (e) {
|
|
114
|
+
this.callbacks.reportMessage(GeneratorMessages.Error_CannotWriteOutputFile({ filename: a.filename, e }));
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Fills in the artifact outputPath used by all generators
|
|
122
|
+
* @returns
|
|
123
|
+
*/
|
|
124
|
+
defaultArtifacts() {
|
|
125
|
+
return {
|
|
126
|
+
"kmc-generate:outputPath": {
|
|
127
|
+
data: null,
|
|
128
|
+
filename: this.callbacks.path.join(this.options.outPath, this.options.id)
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* @internal
|
|
134
|
+
*/
|
|
135
|
+
get test_tokenMap() { return this._tokenMap; }
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=abstract-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-generator.js","sourceRoot":"","sources":["../../src/abstract-generator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AA6D3D,CAAC;AAiBD,CAAC;AAYD,CAAC;AAEF;;;;GAIG;AACH,MAAM,OAAO,iBAAiB;IAC5B;;;OAGG;IACH,yCAAyC;IACzC,uBAAuB;IAEvB;;OAEG;IACO,aAAa,GAAW,EAAE,CAAC;IAErC;;;OAGG;IACH,IAAc,gBAAgB,KAAK,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC3D,iBAAiB,CAAW;IAEpC;;OAEG;IACH,IAAc,QAAQ,KAAK,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAC3C,SAAS,CAA2B;IAE5C;;OAEG;IACH,IAAc,WAAW,KAAK,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IACjD,YAAY,CAA2B;IAE/C;;OAEG;IACH,IAAc,gBAAgB,KAAK,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAC3D,iBAAiB,CAAS;IAExB,MAAM,CAAU,YAAY,GAAG,SAAS,CAAC;IACzC,MAAM,CAAU,gBAAgB,GAAG,GAAG,IAAI,CAAC,YAAY,aAAa,CAAC;IACrE,MAAM,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C,wBAAwB,CAAC,EAAC,UAAU,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC,CAAC;gBAC/F,OAAO,KAAK,CAAC;YACf,CAAC;YACD,IAAI,CAAC;gBACH,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;YACtD,CAAC;YAAC,OAAM,CAAC,EAAE,CAAC;gBACV,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,EAAC,QAAQ,EAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAC,CAAC,CAAC,CAAC;gBACtG,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACO,gBAAgB;QACxB,OAAO;YACL,yBAAyB,EAAE;gBACzB,IAAI,EAAE,IAAI;gBACV,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;aACzE;SACF,CAAA;IACH,CAAC;IAED;;OAEG;IACH,IAAW,aAAa,KAAK,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { KeymanTargets } from "@keymanapp/common-types";
|
|
2
|
+
import { AbstractGenerator, GeneratorArtifacts } from "./abstract-generator.js";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
* Common functionality for generating projects. Do not instantiate
|
|
6
|
+
* this class, rather instantiate a subclass
|
|
7
|
+
*/
|
|
8
|
+
export declare class BasicGenerator extends AbstractGenerator {
|
|
9
|
+
protected readonly DEFAULT_LOCALE = "en";
|
|
10
|
+
protected templatePath: string;
|
|
11
|
+
protected languageTags: string[];
|
|
12
|
+
protected resolvedTargets: KeymanTargets.KeymanTarget[];
|
|
13
|
+
protected preGenerate(): void;
|
|
14
|
+
protected generate(artifacts: GeneratorArtifacts): boolean;
|
|
15
|
+
private getLanguageName;
|
|
16
|
+
private generateLanguageListForPackage;
|
|
17
|
+
private getPlatformDotListForReadme;
|
|
18
|
+
private readonly transformAll;
|
|
19
|
+
private transform;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
* these are exported only for unit tests, do not use
|
|
23
|
+
*/
|
|
24
|
+
readonly test_templatePath: () => string;
|
|
25
|
+
readonly test_languageTags: () => string[];
|
|
26
|
+
readonly test_preGenerate: () => void;
|
|
27
|
+
readonly test_generate: (artifacts: GeneratorArtifacts) => boolean;
|
|
28
|
+
readonly test_getLanguageName: (tag: string) => string;
|
|
29
|
+
readonly test_generateLanguageListForPackage: () => string;
|
|
30
|
+
readonly test_getPlatformDotListForReadme: () => string;
|
|
31
|
+
readonly test_transformAll: (artifacts: GeneratorArtifacts) => boolean;
|
|
32
|
+
readonly test_transform: (sourceFile: string, destFile: string, artifacts: GeneratorArtifacts) => boolean;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=basic-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic-generator.d.ts","sourceRoot":"","sources":["../../src/basic-generator.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAEhF;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,iBAAiB;IAGnD,SAAS,CAAC,QAAQ,CAAC,cAAc,QAAQ;IAEzC,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC;IAC/B,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IACjC,SAAS,CAAC,eAAe,EAAE,aAAa,CAAC,YAAY,EAAE,CAAC;IAExD,SAAS,CAAC,WAAW;IA8BrB,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,kBAAkB,GAAG,OAAO;IAI1D,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,8BAA8B;IAWtC,OAAO,CAAC,2BAA2B;IAQnC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAE0C;IAEvE,OAAO,CAAC,SAAS;IAsCjB;;;OAGG;IACH,SAAgB,iBAAiB,eAA2B;IAC5D,SAAgB,iBAAiB,iBAA2B;IAE5D,SAAgB,gBAAgB,aAA4B;IAC5D,SAAgB,aAAa,cAAe,kBAAkB,aAA8B;IAC5F,SAAgB,oBAAoB,QAAS,MAAM,YAAgC;IACnF,SAAgB,mCAAmC,eAA+C;IAClG,SAAgB,gCAAgC,eAA4C;IAC5F,SAAgB,iBAAiB,cAAe,kBAAkB,aAAkC;IACpG,SAAgB,cAAc,eAAgB,MAAM,YAAY,MAAM,aAAa,kBAAkB,aACnD;CACnD"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Keyman is copyright (C) SIL International. MIT License.
|
|
3
|
+
*
|
|
4
|
+
* Basic generator -- common file generation functionality
|
|
5
|
+
*/
|
|
6
|
+
import { KeymanTargets } from "@keymanapp/common-types";
|
|
7
|
+
import KEYMAN_VERSION from "@keymanapp/keyman-version";
|
|
8
|
+
import { AbstractGenerator } from "./abstract-generator.js";
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
* Common functionality for generating projects. Do not instantiate
|
|
12
|
+
* this class, rather instantiate a subclass
|
|
13
|
+
*/
|
|
14
|
+
export class BasicGenerator extends AbstractGenerator {
|
|
15
|
+
// We'll generate a keyboard with a default 'en' locale if none is passed in
|
|
16
|
+
DEFAULT_LOCALE = 'en';
|
|
17
|
+
templatePath;
|
|
18
|
+
languageTags;
|
|
19
|
+
resolvedTargets;
|
|
20
|
+
preGenerate() {
|
|
21
|
+
const dt = new Date();
|
|
22
|
+
this.languageTags = this.options.languageTags.length
|
|
23
|
+
? this.options.languageTags.map(tag => new Intl.Locale(tag).minimize().toString())
|
|
24
|
+
: [this.DEFAULT_LOCALE];
|
|
25
|
+
//TODO-GENERATE: validate targets
|
|
26
|
+
if (this.options.targets.includes(KeymanTargets.KeymanTarget.any) || this.options.targets.length == 0) {
|
|
27
|
+
this.resolvedTargets = KeymanTargets.AllKeymanTargets.filter(target => target != KeymanTargets.KeymanTarget.any);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this.resolvedTargets = [].concat(this.options.targets);
|
|
31
|
+
}
|
|
32
|
+
this.tokenMap['$NAME'] = this.options.name;
|
|
33
|
+
this.tokenMap['$ID'] = this.options.id;
|
|
34
|
+
this.tokenMap['$KEYMANVERSION'] = (this.options.keymanVersion || KEYMAN_VERSION.VERSION) + '.0';
|
|
35
|
+
this.tokenMap['$VERSION'] = this.options.version;
|
|
36
|
+
this.tokenMap['$COPYRIGHT'] = '© ' + this.options.copyright;
|
|
37
|
+
this.tokenMap['$FULLCOPYRIGHT'] = '© ' + dt.getFullYear().toString() + ' ' + this.options.copyright;
|
|
38
|
+
this.tokenMap['$AUTHOR'] = this.options.author || '';
|
|
39
|
+
this.tokenMap['$TARGETS'] = this.resolvedTargets.join(' ');
|
|
40
|
+
this.tokenMap['$DESCRIPTION'] = this.options.description || this.options.name;
|
|
41
|
+
this.tokenMap['$DATE'] =
|
|
42
|
+
dt.getFullYear().toString() + '-' +
|
|
43
|
+
(dt.getMonth() + 1).toString().padStart(2, '0') + '-' +
|
|
44
|
+
dt.getDate().toString().padStart(2, '0');
|
|
45
|
+
this.tokenMap['$PACKAGE_LANGUAGES'] = this.generateLanguageListForPackage();
|
|
46
|
+
this.tokenMap['$PLATFORMS_DOTLIST_README'] = this.getPlatformDotListForReadme();
|
|
47
|
+
}
|
|
48
|
+
generate(artifacts) {
|
|
49
|
+
return this.transformAll(artifacts);
|
|
50
|
+
}
|
|
51
|
+
getLanguageName(tag) {
|
|
52
|
+
// TODO-GENERATE: probably need to use langtags.json
|
|
53
|
+
return new Intl.Locale(tag).language;
|
|
54
|
+
}
|
|
55
|
+
generateLanguageListForPackage() {
|
|
56
|
+
// <Languages>
|
|
57
|
+
// <Language ID="km">Central Khmer (Khmer, Cambodia)</Language>
|
|
58
|
+
// </Languages>
|
|
59
|
+
const result = ` <Languages>\n` +
|
|
60
|
+
this.languageTags.map(tag => ` <Language ID="${tag}">${this.getLanguageName(tag)}</Language>`).join('\n') +
|
|
61
|
+
`\n </Languages>`;
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
getPlatformDotListForReadme() {
|
|
65
|
+
const result = KeymanTargets.AllKeymanTargets
|
|
66
|
+
.filter(target => this.resolvedTargets.includes(target))
|
|
67
|
+
.map(target => ` * ${KeymanTargets.SKeymanTargetNames[target]}`)
|
|
68
|
+
.join('\n');
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
transformAll = (artifacts) => Object
|
|
72
|
+
.keys(this.filenameMap)
|
|
73
|
+
.every(src => this.transform(src, this.filenameMap[src], artifacts));
|
|
74
|
+
transform(sourceFile, destFile, artifacts) {
|
|
75
|
+
destFile = this.callbacks.path.join(this.options.outPath, this.options.id, destFile == '' ? sourceFile : destFile);
|
|
76
|
+
sourceFile = this.callbacks.path.join(this.templateBasePath, this.templatePath, sourceFile);
|
|
77
|
+
const sourceData = this.callbacks.loadFile(sourceFile);
|
|
78
|
+
if (sourceData == null) {
|
|
79
|
+
// internal error -- source file should be readable
|
|
80
|
+
throw new Error(`source file ${sourceFile} does not exist`);
|
|
81
|
+
}
|
|
82
|
+
const template = new TextDecoder('utf-8').decode(sourceData).replace(/\r/g, '').split('\n');
|
|
83
|
+
const source = [];
|
|
84
|
+
// Filter out unused lines
|
|
85
|
+
for (const line of template) {
|
|
86
|
+
if (!line.match(/\$[A-Z0-9_-]+:/i)) {
|
|
87
|
+
source.push(line);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
const tokens = line.split(':', 2);
|
|
91
|
+
if (this.includedPrefixes.includes(tokens[0].substring(1))) {
|
|
92
|
+
source.push(tokens[1]);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// Replace all tokens
|
|
97
|
+
let dest = source.join('\n');
|
|
98
|
+
Object.keys(this.tokenMap).forEach(token => dest = dest.replaceAll(token, this.tokenMap[token]));
|
|
99
|
+
artifacts[destFile] = {
|
|
100
|
+
filename: destFile,
|
|
101
|
+
data: new TextEncoder().encode(dest)
|
|
102
|
+
};
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @internal
|
|
107
|
+
* these are exported only for unit tests, do not use
|
|
108
|
+
*/
|
|
109
|
+
test_templatePath = () => this.templatePath;
|
|
110
|
+
test_languageTags = () => this.languageTags;
|
|
111
|
+
test_preGenerate = () => this.preGenerate();
|
|
112
|
+
test_generate = (artifacts) => this.generate(artifacts);
|
|
113
|
+
test_getLanguageName = (tag) => this.getLanguageName(tag);
|
|
114
|
+
test_generateLanguageListForPackage = () => this.generateLanguageListForPackage();
|
|
115
|
+
test_getPlatformDotListForReadme = () => this.getPlatformDotListForReadme();
|
|
116
|
+
test_transformAll = (artifacts) => this.transformAll(artifacts);
|
|
117
|
+
test_transform = (sourceFile, destFile, artifacts) => this.transform(sourceFile, destFile, artifacts);
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=basic-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic-generator.js","sourceRoot":"","sources":["../../src/basic-generator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAsB,MAAM,yBAAyB,CAAC;AAEhF;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,iBAAiB;IAEnD,4EAA4E;IACzD,cAAc,GAAG,IAAI,CAAC;IAE/B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|
+
static Fatal_UnexpectedException: (o: {
|
|
6
|
+
e: any;
|
|
7
|
+
}) => import("@keymanapp/developer-utils").CompilerEvent;
|
|
8
|
+
static FATAL_UnexpectedException: number;
|
|
9
|
+
static Info_GeneratingProject: (o: {
|
|
10
|
+
type: string;
|
|
11
|
+
id: string;
|
|
12
|
+
}) => import("@keymanapp/developer-utils").CompilerEvent;
|
|
13
|
+
static INFO_GeneratingProject: number;
|
|
14
|
+
static ERROR_CannotCreateFolder: number;
|
|
15
|
+
static Error_CannotCreateFolder: (o: {
|
|
16
|
+
folderName: string;
|
|
17
|
+
e: any;
|
|
18
|
+
}) => import("@keymanapp/developer-utils").CompilerEvent;
|
|
19
|
+
static ERROR_OutputPathAlreadyExists: number;
|
|
20
|
+
static Error_OutputPathAlreadyExists: (o: {
|
|
21
|
+
outPath: string;
|
|
22
|
+
}) => import("@keymanapp/developer-utils").CompilerEvent;
|
|
23
|
+
static ERROR_CannotWriteOutputFile: number;
|
|
24
|
+
static Error_CannotWriteOutputFile: (o: {
|
|
25
|
+
filename: string;
|
|
26
|
+
e: any;
|
|
27
|
+
}) => import("@keymanapp/developer-utils").CompilerEvent;
|
|
28
|
+
static WARN_ModelIdDoesNotFollowLexicalModelConventions: number;
|
|
29
|
+
static Warn_ModelIdDoesNotFollowLexicalModelConventions: (o: {
|
|
30
|
+
id: string;
|
|
31
|
+
}) => import("@keymanapp/developer-utils").CompilerEvent;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=generator-messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-messages.d.ts","sourceRoot":"","sources":["../../src/generator-messages.ts"],"names":[],"mappings":"AAeA;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,MAAM,CAAC,yBAAyB,MAAM;QAAC,CAAC,EAAE,GAAG,CAAA;KAAC,wDAAqE;IACnH,MAAM,CAAC,yBAAyB,SAAqB;IAErD,MAAM,CAAC,sBAAsB,MAAM;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAC,wDACO;IACpE,MAAM,CAAC,sBAAsB,SAAoB;IAEjD,MAAM,CAAC,wBAAwB,SAAqB;IACpD,MAAM,CAAC,wBAAwB,MAAM;QAAC,UAAU,EAAC,MAAM,CAAC;QAAC,CAAC,EAAE,GAAG,CAAA;KAAC,wDACa;IAE7E,MAAM,CAAC,6BAA6B,SAAqB;IACzD,MAAM,CAAC,6BAA6B,MAAM;QAAC,OAAO,EAAC,MAAM,CAAA;KAAC,wDAES;IAEnE,MAAM,CAAC,2BAA2B,SAAqB;IACvD,MAAM,CAAC,2BAA2B,MAAM;QAAC,QAAQ,EAAC,MAAM,CAAC;QAAC,CAAC,EAAE,GAAG,CAAA;KAAC,wDACO;IAGxE,MAAM,CAAC,gDAAgD,SAAoB;IAC3E,MAAM,CAAC,gDAAgD,MAAM;QAAC,EAAE,EAAE,MAAM,CAAA;KAAC,wDAG5C;CAC9B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Keyman is copyright (C) SIL International. MIT License.
|
|
3
|
+
*
|
|
4
|
+
* Messages for kmc-generate
|
|
5
|
+
*/
|
|
6
|
+
import { CompilerErrorNamespace, CompilerErrorSeverity, CompilerMessageSpec as m, CompilerMessageDef as def, CompilerMessageSpecWithException } from "@keymanapp/developer-utils";
|
|
7
|
+
const Namespace = CompilerErrorNamespace.Generator;
|
|
8
|
+
const SevInfo = CompilerErrorSeverity.Info | Namespace;
|
|
9
|
+
// const SevHint = CompilerErrorSeverity.Hint | Namespace;
|
|
10
|
+
const SevWarn = CompilerErrorSeverity.Warn | Namespace;
|
|
11
|
+
const SevError = CompilerErrorSeverity.Error | Namespace;
|
|
12
|
+
const SevFatal = CompilerErrorSeverity.Fatal | Namespace;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
export class GeneratorMessages {
|
|
17
|
+
static Fatal_UnexpectedException = (o) => m(this.FATAL_UnexpectedException, null, o.e ?? 'unknown error');
|
|
18
|
+
static FATAL_UnexpectedException = SevFatal | 0x0001;
|
|
19
|
+
static Info_GeneratingProject = (o) => m(this.INFO_GeneratingProject, `Generating project of type ${def(o.type)} with id ${def(o.id)}`);
|
|
20
|
+
static INFO_GeneratingProject = SevInfo | 0x0002;
|
|
21
|
+
static ERROR_CannotCreateFolder = SevError | 0x0003;
|
|
22
|
+
static Error_CannotCreateFolder = (o) => CompilerMessageSpecWithException(this.ERROR_CannotCreateFolder, null, `Unable to create folder ${def(o.folderName)}: ${o.e ?? 'unknown error'}`);
|
|
23
|
+
static ERROR_OutputPathAlreadyExists = SevError | 0x0004;
|
|
24
|
+
static Error_OutputPathAlreadyExists = (o) => m(this.ERROR_OutputPathAlreadyExists, `Output path ${def(o.outPath)} already exists, not overwriting`);
|
|
25
|
+
static ERROR_CannotWriteOutputFile = SevError | 0x0005;
|
|
26
|
+
static Error_CannotWriteOutputFile = (o) => CompilerMessageSpecWithException(this.ERROR_CannotWriteOutputFile, null, `Unable to write file ${def(o.filename)}: ${o.e ?? 'unknown error'}`);
|
|
27
|
+
// See also PackageCompilerMessages.WARN_PackageNameDoesNotFollowLexicalModelConventions
|
|
28
|
+
static WARN_ModelIdDoesNotFollowLexicalModelConventions = SevWarn | 0x0006;
|
|
29
|
+
static Warn_ModelIdDoesNotFollowLexicalModelConventions = (o) => m(this.WARN_ModelIdDoesNotFollowLexicalModelConventions, `The id ${def(o.id)} does not follow the recommended model id conventions. The id should be all lower case, ` +
|
|
30
|
+
`include only alphanumeric characters and underscore (_), not start with a digit, and should have the structure ` +
|
|
31
|
+
`<author>.<bcp47>.<uniq>`);
|
|
32
|
+
}
|
|
33
|
+
;
|
|
34
|
+
//# sourceMappingURL=generator-messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-messages.js","sourceRoot":"","sources":["../../src/generator-messages.ts"],"names":[],"mappings":"AAAA;;;;GAIG;A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,CAAC,CAAC;IAE7E,MAAM,CAAC,6BAA6B,GAAG,QAAQ,GAAG,MAAM,CAAC;IACzD,MAAM,CAAC,6BAA6B,GAAG,CAAC,CAAkB,EAAE,EAAE,CAAC,CAAC,CAC9D,IAAI,CAAC,6BAA6B,EAClC,eAAe,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,kCAAkC,CAAC,CAAC;IAEnE,MAAM,CAAC,2BAA2B,GAAG,QAAQ,GAAG,MAAM,CAAC;IACvD,MAAM,CAAC,2BAA2B,GAAG,CAAC,CAA2B,EAAE,EAAE,CAAC,gCAAgC,CAAC,IAAI,CAAC,2BAA2B,EAAE,IAAI,EAC3I,wBAAwB,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC;IAExE,wFAAwF;IACxF,MAAM,CAAC,gDAAgD,GAAG,OAAO,GAAG,MAAM,CAAC;IAC3E,MAAM,CAAC,gDAAgD,GAAG,CAAC,CAAc,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,gDAAgD,EACnI,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,0FAA0F;QAC7G,iHAAiH;QACjH,yBAAyB,CAAC,CAAC;;AAC9B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { KeymanCompiler } from '@keymanapp/developer-utils';
|
|
2
|
+
import { GeneratorResult } from './abstract-generator.js';
|
|
3
|
+
import { BasicGenerator } from './basic-generator.js';
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
* Generate a Keyman keyboard project. The generator does not read or write from
|
|
7
|
+
* filesystem or network directly, but relies on callbacks for all external IO.
|
|
8
|
+
*/
|
|
9
|
+
export declare class KeymanKeyboardGenerator extends BasicGenerator implements KeymanCompiler {
|
|
10
|
+
static readonly SFile_Keyboard = "keyboard";
|
|
11
|
+
static readonly SFile_KeyboardKMN: string;
|
|
12
|
+
static readonly SFile_KeyboardKPS: string;
|
|
13
|
+
static readonly SFile_KeyboardKVKS: string;
|
|
14
|
+
static readonly SFile_TouchLayout: string;
|
|
15
|
+
static readonly SFile_Project: string;
|
|
16
|
+
/**
|
|
17
|
+
* Generate a Keyman Keyboard project. Returns an object containing binary
|
|
18
|
+
* artifacts on success. The files are passed in by name, and the compiler
|
|
19
|
+
* will use callbacks as passed to the {@link AbstractGenerator.init}
|
|
20
|
+
* function to read any input files by disk.
|
|
21
|
+
* @returns Binary artifacts on success, null on failure.
|
|
22
|
+
*/
|
|
23
|
+
run(): Promise<GeneratorResult>;
|
|
24
|
+
private readonly targetIncludes;
|
|
25
|
+
private readonly hasKVKS;
|
|
26
|
+
private readonly hasWeb;
|
|
27
|
+
private readonly hasKMX;
|
|
28
|
+
private readonly hasTouchLayout;
|
|
29
|
+
private readonly hasIcon;
|
|
30
|
+
private writeIcon;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=keyman-keyboard-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyman-keyboard-generator.d.ts","sourceRoot":"","sources":["../../src/keyman-keyboard-generator.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAG,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAsB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,cAAe,YAAW,cAAc;IAUnF,MAAM,CAAC,QAAQ,CAAC,cAAc,cAAc;IAC5C,MAAM,CAAC,QAAQ,CAAC,iBAAiB,SAAwF;IACzH,MAAM,CAAC,QAAQ,CAAC,iBAAiB,SAAiF;IAClH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,SAAwF;IAC1H,MAAM,CAAC,QAAQ,CAAC,iBAAiB,SAAqF;IACtH,MAAM,CAAC,QAAQ,CAAC,aAAa,SAA6D;IAE1F;;;;;;OAMG;IACG,GAAG,IAAI,OAAO,CAAC,eAAe,CAAC;IAmDrC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAE9B;IAED,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyE;IACjG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqE;IAC5F,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqE;IAC5F,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA+D;IAI9F,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IAEvC,OAAO,CAAC,SAAS;CAKlB"}
|