@qooxdoo/framework 7.5.0 → 7.6.0
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/Manifest.json +169 -44
- package/bin/deploy/qx +7 -5
- package/lib/compiler/compile-info.json +70 -62
- package/lib/compiler/index.js +3809 -2695
- package/lib/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +7 -7
- package/lib/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +10 -10
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +6 -6
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +9 -9
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +5 -5
- package/lib/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +7 -7
- package/lib/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +10 -10
- package/lib/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/Application.tmpl.js +6 -6
- package/lib/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +12 -12
- package/lib/resource/qx/tool/schema/Manifest-1-0-0.json +79 -26
- package/lib/resource/qx/tool/schema/Manifest-2-0-0.json +17 -26
- package/lib/resource/qx/tool/schema/compile-1-0-0.json +40 -53
- package/lib/resource/qx/tool/website/src/about.md +1 -1
- package/package.json +3 -3
- package/source/class/qx/bom/Font.js +36 -0
- package/source/class/qx/bom/webfonts/Validator.js +31 -6
- package/source/class/qx/bom/webfonts/WebFont.js +60 -64
- package/source/class/qx/bom/webfonts/WebFontLoader.js +461 -0
- package/source/class/qx/core/Object.js +1 -1
- package/source/class/qx/data/Array.js +27 -0
- package/source/class/qx/dev/FakeServer.js +1 -1
- package/source/class/qx/event/handler/Focus.js +2 -1
- package/source/class/qx/event/handler/GestureCore.js +1 -1
- package/source/class/qx/test/bom/webfonts/Validator.js +0 -6
- package/source/class/qx/test/core/Environment.js +8 -8
- package/source/class/qx/test/core/Validation.js +2 -2
- package/source/class/qx/test/dev/unit/Requirements.js +6 -6
- package/source/class/qx/test/io/transport/Websocket.js +1 -1
- package/source/class/qx/test/ui/basic/Image.js +3 -3
- package/source/class/qx/test/ui/basic/Label.js +0 -65
- package/source/class/qx/test/ui/form/Field.js +56 -52
- package/source/class/qx/theme/IndigoDark.js +1 -1
- package/source/class/qx/theme/classic/Font.js +7 -23
- package/source/class/qx/theme/iconfont/LoadMaterialIcons.js +2 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsOutlined.js +2 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsRound.js +2 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsSharp.js +2 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsTwoTone.js +2 -4
- package/source/class/qx/theme/indigo/DecorationDark.js +30 -0
- package/source/class/qx/theme/indigo/Font.js +8 -15
- package/source/class/qx/theme/manager/Font.js +151 -38
- package/source/class/qx/theme/modern/Font.js +1 -0
- package/source/class/qx/theme/simple/Font.js +3 -1
- package/source/class/qx/theme/tangible/Appearance.js +1 -0
- package/source/class/qx/theme/tangible/Font.js +9 -62
- package/source/class/qx/theme/tangible/Image.js +1 -4
- package/source/class/qx/tool/cli/Application.js +4 -1
- package/source/class/qx/tool/cli/Cli.js +34 -23
- package/source/class/qx/tool/cli/Watch.js +8 -6
- package/source/class/qx/tool/cli/api/CompilerApi.js +8 -0
- package/source/class/qx/tool/cli/commands/Add.js +1 -1
- package/source/class/qx/tool/cli/commands/Compile.js +24 -1
- package/source/class/qx/tool/cli/commands/Config.js +16 -141
- package/source/class/qx/tool/cli/commands/ExportGlyphs.js +134 -0
- package/source/class/qx/tool/cli/commands/Lint.js +1 -1
- package/source/class/qx/tool/cli/commands/Package.js +3 -0
- package/source/class/qx/tool/cli/commands/Pkg.js +1 -1
- package/source/class/qx/tool/cli/commands/Run.js +6 -7
- package/source/class/qx/tool/cli/commands/Serve.js +29 -36
- package/source/class/qx/tool/cli/commands/Test.js +3 -2
- package/source/class/qx/tool/cli/commands/add/Script.js +3 -1
- package/source/class/qx/tool/cli/commands/config/Delete.js +47 -0
- package/source/class/qx/tool/cli/commands/config/Get.js +52 -0
- package/source/class/qx/tool/cli/commands/config/List.js +81 -0
- package/source/class/qx/tool/cli/commands/config/Set.js +61 -0
- package/source/class/qx/tool/cli/commands/package/Install.js +3 -0
- package/source/class/qx/tool/cli/commands/package/Update.js +3 -3
- package/source/class/qx/tool/compiler/Analyser.js +45 -0
- package/source/class/qx/tool/compiler/ClassFile.js +43 -1
- package/source/class/qx/tool/compiler/Console.js +6 -1
- package/source/class/qx/tool/compiler/app/Application.js +19 -0
- package/source/class/qx/tool/compiler/app/Cldr.js +63 -26
- package/source/class/qx/tool/compiler/app/Library.js +51 -2
- package/source/class/qx/tool/compiler/app/ManifestFont.js +181 -0
- package/source/class/qx/tool/compiler/app/WebFont.js +144 -234
- package/source/class/qx/tool/compiler/makers/AppMaker.js +13 -0
- package/source/class/qx/tool/compiler/resources/ImageLoader.js +22 -12
- package/source/class/qx/tool/compiler/resources/Manager.js +2 -2
- package/source/class/qx/tool/compiler/resources/MetaLoader.js +7 -2
- package/source/class/qx/tool/compiler/resources/ResourceLoader.js +21 -0
- package/source/class/qx/tool/compiler/targets/Target.js +186 -67
- package/source/class/qx/tool/migration/M7_5_6.js +75 -0
- package/source/class/qx/tool/utils/Http.js +69 -0
- package/source/class/qx/ui/basic/Image.js +6 -2
- package/source/class/qx/ui/basic/Label.js +20 -38
- package/source/class/qx/ui/core/Widget.js +13 -42
- package/source/class/qx/ui/form/AbstractField.js +8 -2
- package/source/class/qx/ui/form/FileSelectorButton.js +5 -0
- package/source/class/qx/ui/table/pane/FocusIndicator.js +5 -4
- package/source/class/qx/ui/table/pane/Pane.js +14 -0
- package/source/class/qx/ui/table/pane/Scroller.js +3 -3
- package/source/class/qx/ui/virtual/core/Scroller.js +8 -2
- package/source/class/qx/ui/window/Window.js +9 -8
- package/source/resource/qx/iconfont/MaterialIcons/materialicons.json +10912 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined.json +10967 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround.json +10992 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp.json +10992 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone.json +9947 -0
- package/source/resource/qx/iconfont/MaterialIcons/x.json +10967 -0
- package/source/resource/qx/iconfont/export-glyphs.sh +22 -0
- package/source/resource/qx/mobile/scss/common/_gradients.scss +1 -1
- package/source/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +7 -7
- package/source/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +10 -10
- package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +6 -6
- package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +9 -9
- package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +5 -5
- package/source/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +7 -7
- package/source/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +10 -10
- package/source/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/Application.tmpl.js +6 -6
- package/source/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +12 -12
- package/source/resource/qx/tool/schema/Manifest-1-0-0.json +79 -26
- package/source/resource/qx/tool/schema/Manifest-2-0-0.json +17 -26
- package/source/resource/qx/tool/schema/compile-1-0-0.json +40 -53
- package/source/resource/qx/tool/website/src/about.md +1 -1
- package/source/class/qx/bom/webfonts/Manager.js +0 -652
- package/source/class/qx/test/bom/webfonts/Manager.js +0 -238
|
@@ -102,16 +102,12 @@ qx.Class.define("qx.theme.manager.Font", {
|
|
|
102
102
|
// the theme and are not updating the cache
|
|
103
103
|
var theme = this.getTheme();
|
|
104
104
|
if (theme !== null && theme.fonts[value]) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
// complete blob in one.
|
|
110
|
-
if (theme.fonts[value].comparisonString) {
|
|
111
|
-
fo.setComparisonString(theme.fonts[value].comparisonString);
|
|
105
|
+
let createdFonts = this.__initialiseFonts(theme.fonts);
|
|
106
|
+
let font = createdFonts[value] || null;
|
|
107
|
+
if (font) {
|
|
108
|
+
cache[value] = font;
|
|
112
109
|
}
|
|
113
|
-
|
|
114
|
-
return (cache[value] = fo.set(theme.fonts[value]));
|
|
110
|
+
return font;
|
|
115
111
|
}
|
|
116
112
|
if (qx.core.Environment.get("qx.debug")) {
|
|
117
113
|
if (theme) {
|
|
@@ -154,16 +150,16 @@ qx.Class.define("qx.theme.manager.Font", {
|
|
|
154
150
|
// the theme and are not updating the cache
|
|
155
151
|
var theme = this.getTheme();
|
|
156
152
|
if (theme !== null && value && theme.fonts[value]) {
|
|
157
|
-
var
|
|
158
|
-
var
|
|
153
|
+
var fontClass = this.__getFontClass(theme.fonts[value]);
|
|
154
|
+
var font = new fontClass();
|
|
159
155
|
|
|
160
156
|
// Inject information about custom charcter set tests before we apply the
|
|
161
157
|
// complete blob in one.
|
|
162
158
|
if (theme.fonts[value].comparisonString) {
|
|
163
|
-
|
|
159
|
+
font.setComparisonString(theme.fonts[value].comparisonString);
|
|
164
160
|
}
|
|
165
161
|
|
|
166
|
-
cache[value] =
|
|
162
|
+
cache[value] = font.set(theme.fonts[value]);
|
|
167
163
|
return true;
|
|
168
164
|
}
|
|
169
165
|
|
|
@@ -195,41 +191,149 @@ qx.Class.define("qx.theme.manager.Font", {
|
|
|
195
191
|
}
|
|
196
192
|
},
|
|
197
193
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
194
|
+
/**
|
|
195
|
+
* Initialises fonts from a set of font definitions (eg from a theme Font configuration)
|
|
196
|
+
*
|
|
197
|
+
* @param {Map<String,Object>} fontDefs indexed by font ID
|
|
198
|
+
* @return {Map<String,qx.bom.Font>} created fonts
|
|
199
|
+
*/
|
|
200
|
+
__initialiseFonts(fontDefs) {
|
|
201
|
+
let webFontDefs = [];
|
|
202
|
+
let createdFonts = {};
|
|
203
|
+
|
|
204
|
+
for (var fontId in fontDefs) {
|
|
205
|
+
let fontDef = fontDefs[fontId];
|
|
206
|
+
if (fontDef.include && fontDefs[fontDef.include]) {
|
|
207
|
+
this.__resolveInclude(fontDefs, fontId);
|
|
208
|
+
}
|
|
201
209
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
210
|
+
if (fontDef.fontName) {
|
|
211
|
+
let preset = this._manifestFonts[fontDef.fontName];
|
|
212
|
+
Object.keys(preset).forEach(presetKey => {
|
|
213
|
+
if (fontDef[presetKey] === undefined) {
|
|
214
|
+
fontDef[presetKey] = preset[presetKey];
|
|
215
|
+
}
|
|
216
|
+
});
|
|
206
217
|
}
|
|
207
|
-
}
|
|
208
218
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
219
|
+
// If the theme font is defining sources, then we want to intercept that and either
|
|
220
|
+
// fabricate a Manifest font, or if the qx.bom.webfonts.WebFont has already been
|
|
221
|
+
// created we need to add the font face definition to the existing one
|
|
222
|
+
if (fontDef.sources) {
|
|
223
|
+
// Make sure the font family is specified in the font definition (it was previously allowable to
|
|
224
|
+
// only specify the font family in the sources object)
|
|
225
|
+
if (
|
|
226
|
+
fontDef.sources.family &&
|
|
227
|
+
fontDef.family.indexOf(fontDef.sources.family) < 0
|
|
228
|
+
) {
|
|
229
|
+
fontDef.family.unshift(fontDef.sources.family);
|
|
230
|
+
}
|
|
231
|
+
let family = fontDef.family[0];
|
|
232
|
+
|
|
233
|
+
// Make sure that there is a font definition
|
|
234
|
+
if (!fontDefs[family]) {
|
|
235
|
+
fontDefs[family] = {
|
|
236
|
+
fontFaces: []
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Create a lookup of the fontFaces within the font definition
|
|
241
|
+
let fontFacesLookup = {};
|
|
242
|
+
fontDefs[family].fontFaces.forEach(fontFace => {
|
|
243
|
+
let fontKey = qx.bom.webfonts.WebFontLoader.createFontLookupKey(
|
|
244
|
+
fontFace.family,
|
|
245
|
+
fontFace.fontWeight,
|
|
246
|
+
fontFace.fontStyle
|
|
247
|
+
);
|
|
248
|
+
|
|
249
|
+
fontFacesLookup[fontKey] = fontFace;
|
|
250
|
+
});
|
|
251
|
+
let fontKey = qx.bom.webfonts.WebFontLoader.createFontLookupKey(
|
|
252
|
+
fontDef.sources.family,
|
|
253
|
+
fontDef.sources.fontWeight,
|
|
254
|
+
fontDef.sources.fontStyle
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
if (!fontFacesLookup[fontKey]) {
|
|
258
|
+
let fontFace = {
|
|
259
|
+
fontFamily: fontDef.sources.family,
|
|
260
|
+
fontWeight: fontDef.sources.fontWeight,
|
|
261
|
+
fontStyle: fontDef.sources.fontStyle
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
fontDefs[family].fontFaces.push(fontFace);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
if (fontDef.css || fontDef.fontFaces) {
|
|
268
|
+
webFontDefs.push(fontDef);
|
|
269
|
+
}
|
|
270
|
+
var fontClass = this.__getFontClass(fontDef);
|
|
271
|
+
var font = new fontClass();
|
|
272
|
+
|
|
273
|
+
// Inject information about custom charcter set tests before we apply the
|
|
274
|
+
// complete blob in one.
|
|
275
|
+
if (fontDef.comparisonString) {
|
|
276
|
+
font.setComparisonString(fontDef.comparisonString);
|
|
277
|
+
}
|
|
213
278
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
279
|
+
createdFonts[fontId] = font;
|
|
280
|
+
qx.Class.getProperties(qx.bom.Font).forEach(propertyName => {
|
|
281
|
+
let value = fontDef[propertyName];
|
|
282
|
+
if (value !== undefined) {
|
|
283
|
+
font["set" + qx.lang.String.firstUp(propertyName)](value);
|
|
217
284
|
}
|
|
285
|
+
});
|
|
286
|
+
createdFonts[fontId].themed = true;
|
|
287
|
+
}
|
|
218
288
|
|
|
219
|
-
|
|
220
|
-
|
|
289
|
+
// Load all of the web fonts
|
|
290
|
+
for (let webFontDef of webFontDefs) {
|
|
291
|
+
let loader = qx.bom.webfonts.WebFontLoader.getLoader(
|
|
292
|
+
webFontDef.family[0],
|
|
293
|
+
true
|
|
294
|
+
);
|
|
221
295
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
296
|
+
["css", "fontFaces", "comparisonString", "version"].forEach(
|
|
297
|
+
propertyName => {
|
|
298
|
+
if (webFontDef[propertyName]) {
|
|
299
|
+
loader["set" + qx.lang.String.firstUp(propertyName)](
|
|
300
|
+
webFontDef[propertyName]
|
|
301
|
+
);
|
|
302
|
+
}
|
|
226
303
|
}
|
|
304
|
+
);
|
|
227
305
|
|
|
228
|
-
|
|
229
|
-
|
|
306
|
+
loader.load();
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Initialise the fonts, including those that refer to the loaded web fonts
|
|
310
|
+
for (let fontId in createdFonts) {
|
|
311
|
+
let font = createdFonts[fontId];
|
|
312
|
+
font.loadComplete();
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
return createdFonts;
|
|
316
|
+
},
|
|
317
|
+
|
|
318
|
+
// apply method
|
|
319
|
+
_applyTheme(value) {
|
|
320
|
+
let createdFonts = (this._dynamic = {});
|
|
321
|
+
|
|
322
|
+
for (let key in createdFonts) {
|
|
323
|
+
if (createdFonts[key].themed) {
|
|
324
|
+
createdFonts[key].dispose();
|
|
325
|
+
delete createdFonts[key];
|
|
230
326
|
}
|
|
231
327
|
}
|
|
232
|
-
|
|
328
|
+
|
|
329
|
+
if (value) {
|
|
330
|
+
var fonts = this._manifestFonts
|
|
331
|
+
? Object.assign(value.fonts, this._manifestFonts)
|
|
332
|
+
: value.fonts;
|
|
333
|
+
createdFonts = this.__initialiseFonts(fonts);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
this._setDynamic(createdFonts);
|
|
233
337
|
},
|
|
234
338
|
|
|
235
339
|
/**
|
|
@@ -239,10 +343,19 @@ qx.Class.define("qx.theme.manager.Font", {
|
|
|
239
343
|
* @return {Class}
|
|
240
344
|
*/
|
|
241
345
|
__getFontClass(config) {
|
|
242
|
-
if (config.
|
|
346
|
+
if (config.fontFaces || config.css) {
|
|
243
347
|
return qx.bom.webfonts.WebFont;
|
|
244
348
|
}
|
|
245
349
|
return qx.bom.Font;
|
|
350
|
+
},
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Returns the font information output by the compiler
|
|
354
|
+
* @internal subject to change
|
|
355
|
+
* @return {Object}
|
|
356
|
+
*/
|
|
357
|
+
getManifestFonts() {
|
|
358
|
+
return this._manifestFonts;
|
|
246
359
|
}
|
|
247
360
|
},
|
|
248
361
|
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* The simple qooxdoo font theme.
|
|
21
|
+
*
|
|
22
|
+
* @usefont(qx.theme.monospace)
|
|
21
23
|
*/
|
|
22
24
|
qx.Theme.define("qx.theme.simple.Font", {
|
|
23
25
|
fonts: {
|
|
@@ -44,7 +46,7 @@ qx.Theme.define("qx.theme.simple.Font", {
|
|
|
44
46
|
|
|
45
47
|
monospace: {
|
|
46
48
|
size: 11,
|
|
47
|
-
|
|
49
|
+
fontName: "qx.theme.monospace"
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
});
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
* @asset(qx/icon/Tango/16/actions/window-close.png)
|
|
35
35
|
* @asset(qx/icon/Tango/16/actions/dialog-cancel.png)
|
|
36
36
|
* @asset(qx/icon/Tango/16/actions/dialog-ok.png)
|
|
37
|
+
* @usefont(MaterialIcons)
|
|
37
38
|
*/
|
|
38
39
|
qx.Theme.define("qx.theme.tangible.Appearance", {
|
|
39
40
|
appearances: {
|
|
@@ -17,15 +17,12 @@
|
|
|
17
17
|
This theme is based in large parts on the osparc.theme
|
|
18
18
|
|
|
19
19
|
************************************************************************ */
|
|
20
|
-
|
|
21
|
-
* @asset(qx/font/Roboto/*.woff)
|
|
22
|
-
* @asset(qx/font/Roboto/*.woff2)
|
|
23
|
-
* @asset(qx/font/Roboto/*.eot)
|
|
24
|
-
* @asset(qx/font/Roboto/*.ttf)
|
|
25
|
-
* @asset(qx/iconfont/MaterialIcons/*)
|
|
26
|
-
*/
|
|
20
|
+
|
|
27
21
|
/**
|
|
28
22
|
* The simple qooxdoo font theme.
|
|
23
|
+
*
|
|
24
|
+
* @usefont(Roboto)
|
|
25
|
+
* @usefont(Roboto Mono)
|
|
29
26
|
*/
|
|
30
27
|
qx.Theme.define("qx.theme.tangible.Font", {
|
|
31
28
|
fonts: {
|
|
@@ -33,17 +30,7 @@ qx.Theme.define("qx.theme.tangible.Font", {
|
|
|
33
30
|
size: 14,
|
|
34
31
|
family: ["sans-serif"],
|
|
35
32
|
color: "text-primary-on-surface",
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
family: "Roboto",
|
|
39
|
-
source: [
|
|
40
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-regular.eot",
|
|
41
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-regular.woff2",
|
|
42
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-regular.woff",
|
|
43
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-regular.ttf"
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
]
|
|
33
|
+
fontName: "Roboto"
|
|
47
34
|
},
|
|
48
35
|
|
|
49
36
|
bold: {
|
|
@@ -51,68 +38,28 @@ qx.Theme.define("qx.theme.tangible.Font", {
|
|
|
51
38
|
family: ["sans-serif"],
|
|
52
39
|
bold: true,
|
|
53
40
|
color: "text-primary-on-surface",
|
|
54
|
-
|
|
55
|
-
{
|
|
56
|
-
family: "Roboto",
|
|
57
|
-
source: [
|
|
58
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-700.eot",
|
|
59
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-700.woff2",
|
|
60
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-700.woff",
|
|
61
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-700.ttf"
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
]
|
|
41
|
+
fontName: "Roboto"
|
|
65
42
|
},
|
|
66
43
|
|
|
67
44
|
headline: {
|
|
68
45
|
size: 24,
|
|
69
46
|
family: ["sans-serif"],
|
|
70
47
|
color: "text-primary-on-surface",
|
|
71
|
-
|
|
72
|
-
{
|
|
73
|
-
family: "Roboto",
|
|
74
|
-
source: [
|
|
75
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-regular.eot",
|
|
76
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-regular.woff2",
|
|
77
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-regular.woff",
|
|
78
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-regular.ttf"
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
]
|
|
48
|
+
fontName: "Roboto"
|
|
82
49
|
},
|
|
83
50
|
|
|
84
51
|
small: {
|
|
85
52
|
size: 12,
|
|
86
53
|
family: ["sans-serif"],
|
|
87
54
|
color: "text-primary-on-surface",
|
|
88
|
-
|
|
89
|
-
{
|
|
90
|
-
family: "Roboto",
|
|
91
|
-
source: [
|
|
92
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-regular.eot",
|
|
93
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-regular.woff2",
|
|
94
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-regular.woff",
|
|
95
|
-
"qx/font/Roboto/roboto-v18-latin_latin-ext-regular.ttf"
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
]
|
|
55
|
+
fontName: "Roboto"
|
|
99
56
|
},
|
|
100
57
|
|
|
101
58
|
monospace: {
|
|
102
59
|
size: 14,
|
|
103
60
|
family: ["monospace"],
|
|
104
61
|
color: "text-primary-on-surface",
|
|
105
|
-
|
|
106
|
-
{
|
|
107
|
-
family: "Roboto Mono",
|
|
108
|
-
source: [
|
|
109
|
-
"qx/font/Roboto/roboto-mono-v6-latin_latin-ext-regular.eot",
|
|
110
|
-
"qx/font/Roboto/roboto-mono-v6-latin_latin-ext-regular.woff2",
|
|
111
|
-
"qx/font/Roboto/roboto-mono-v6-latin_latin-ext-regular.woff",
|
|
112
|
-
"qx/font/Roboto/roboto-mono-v6-latin_latin-ext-regular.ttf"
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
]
|
|
62
|
+
fontName: "Roboto Mono"
|
|
116
63
|
}
|
|
117
64
|
}
|
|
118
65
|
});
|
|
@@ -24,11 +24,8 @@
|
|
|
24
24
|
/**
|
|
25
25
|
* Mapping class for all images used in the tangible theme.
|
|
26
26
|
*
|
|
27
|
-
* @asset(qx/iconfont/MaterialIcons/materialicons-v50.ttf)
|
|
28
|
-
* @asset(qx/iconfont/MaterialIcons/materialicons-v50.woff2)
|
|
29
|
-
* @asset(qx/iconfont/MaterialIcons/materialicons-v50.woff)
|
|
30
|
-
* @asset(qx/iconfont/MaterialIcons/materialicons-v50.eot)
|
|
31
27
|
* @asset(qx/static/blank.png)
|
|
28
|
+
* @usefont(MaterialIcons)
|
|
32
29
|
*/
|
|
33
30
|
|
|
34
31
|
qx.Class.define("qx.theme.tangible.Image", {
|
|
@@ -29,11 +29,14 @@ qx.Class.define("qx.tool.cli.Application", {
|
|
|
29
29
|
* during startup of the application
|
|
30
30
|
*/
|
|
31
31
|
async main() {
|
|
32
|
+
process.exitCode = 0;
|
|
32
33
|
try {
|
|
33
34
|
await new qx.tool.cli.Cli().run();
|
|
34
35
|
} catch (e) {
|
|
35
36
|
qx.tool.compiler.Console.error("Error: " + (e.stack || e.message));
|
|
36
|
-
process.
|
|
37
|
+
process.exitCode = 1;
|
|
38
|
+
} finally {
|
|
39
|
+
process.exit();
|
|
37
40
|
}
|
|
38
41
|
}
|
|
39
42
|
},
|
|
@@ -25,12 +25,18 @@ const semver = require("semver");
|
|
|
25
25
|
*/
|
|
26
26
|
qx.Class.define("qx.tool.cli.Cli", {
|
|
27
27
|
extend: qx.core.Object,
|
|
28
|
+
properties: {
|
|
29
|
+
command: {
|
|
30
|
+
apply: "__applyCommand"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
28
33
|
|
|
29
34
|
construct() {
|
|
30
35
|
super();
|
|
31
36
|
if (qx.tool.cli.Cli.__instance) {
|
|
32
37
|
throw new Error("qx.tool.cli.Cli has already been initialized!");
|
|
33
38
|
}
|
|
39
|
+
this.__compileJsExists = false;
|
|
34
40
|
qx.tool.cli.Cli.__instance = this;
|
|
35
41
|
// include & register log appender
|
|
36
42
|
qx.log.appender.NodeConsole;
|
|
@@ -53,14 +59,16 @@ qx.Class.define("qx.tool.cli.Cli", {
|
|
|
53
59
|
_compileJsonFilename: null,
|
|
54
60
|
|
|
55
61
|
/** @type {Object} Parsed arguments */
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/** @type {Promise} Promise that resolves to the _parsedArgs, but only when completely finished parsing them */
|
|
59
|
-
__promiseParseArgs: null,
|
|
62
|
+
__parsedArgs: null,
|
|
60
63
|
|
|
61
64
|
/** @type {Boolean} Whether libraries have had their `.load()` method called yet */
|
|
62
65
|
__librariesNotified: false,
|
|
63
66
|
|
|
67
|
+
__applyCommand(command) {
|
|
68
|
+
command.setCompilerApi(this._compilerApi);
|
|
69
|
+
this._compilerApi.setCommand(command);
|
|
70
|
+
},
|
|
71
|
+
|
|
64
72
|
/**
|
|
65
73
|
* Creates an instance of yargs, with minimal options
|
|
66
74
|
*
|
|
@@ -182,6 +190,7 @@ Version: v${await qx.tool.config.Utils.getQxVersion()}
|
|
|
182
190
|
"Config",
|
|
183
191
|
"Deploy",
|
|
184
192
|
"Es6ify",
|
|
193
|
+
"ExportGlyphs",
|
|
185
194
|
"Package",
|
|
186
195
|
"Pkg", // alias for Package
|
|
187
196
|
"Create",
|
|
@@ -241,18 +250,10 @@ Version: v${await qx.tool.config.Utils.getQxVersion()}
|
|
|
241
250
|
*/
|
|
242
251
|
async processCommand(command) {
|
|
243
252
|
qx.tool.compiler.Console.getInstance().setVerbose(this.argv.verbose);
|
|
244
|
-
command.setCompilerApi(this._compilerApi);
|
|
245
|
-
this._compilerApi.setCommand(command);
|
|
246
253
|
await this.__notifyLibraries();
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
return res;
|
|
251
|
-
} catch (e) {
|
|
252
|
-
qx.tool.compiler.Console.error("Error: " + (e.stack || e.message));
|
|
253
|
-
process.exit(1);
|
|
254
|
-
return null;
|
|
255
|
-
}
|
|
254
|
+
const res = await command.process();
|
|
255
|
+
await this._compilerApi.afterProcessFinished(command, res);
|
|
256
|
+
return res;
|
|
256
257
|
},
|
|
257
258
|
|
|
258
259
|
/**
|
|
@@ -260,8 +261,8 @@ Version: v${await qx.tool.config.Utils.getQxVersion()}
|
|
|
260
261
|
*
|
|
261
262
|
* @return {Object}
|
|
262
263
|
*/
|
|
263
|
-
|
|
264
|
-
return
|
|
264
|
+
getParsedArgs() {
|
|
265
|
+
return this.__parsedArgs;
|
|
265
266
|
},
|
|
266
267
|
|
|
267
268
|
/**
|
|
@@ -283,8 +284,8 @@ Version: v${await qx.tool.config.Utils.getQxVersion()}
|
|
|
283
284
|
var args = qx.lang.Array.clone(process.argv);
|
|
284
285
|
args.shift();
|
|
285
286
|
process.title = args.join(" ");
|
|
286
|
-
|
|
287
|
-
|
|
287
|
+
await this.__parseArgsImpl();
|
|
288
|
+
return this.processCommand(this.getCommand());
|
|
288
289
|
},
|
|
289
290
|
|
|
290
291
|
/**
|
|
@@ -327,6 +328,7 @@ Version: v${await qx.tool.config.Utils.getQxVersion()}
|
|
|
327
328
|
|
|
328
329
|
let CompilerApi = qx.tool.cli.api.CompilerApi;
|
|
329
330
|
if (await fs.existsAsync(compileJsFilename)) {
|
|
331
|
+
this.__compileJsExists = true;
|
|
330
332
|
let compileJs = await this.__loadJs(compileJsFilename);
|
|
331
333
|
this._compileJsFilename = compileJsFilename;
|
|
332
334
|
if (compileJs.CompilerApi) {
|
|
@@ -356,7 +358,7 @@ Version: v${await qx.tool.config.Utils.getQxVersion()}
|
|
|
356
358
|
(await qx.tool.utils.Json.loadJsonAsync(name)) || lockfileContent;
|
|
357
359
|
} catch (ex) {
|
|
358
360
|
// Nothing
|
|
359
|
-
}
|
|
361
|
+
}
|
|
360
362
|
// check semver-type compatibility (i.e. compatible as long as major version stays the same)
|
|
361
363
|
let schemaVersion = semver.coerce(
|
|
362
364
|
qx.tool.config.Lockfile.getInstance().getVersion(),
|
|
@@ -569,8 +571,8 @@ Version: v${await qx.tool.config.Utils.getQxVersion()}
|
|
|
569
571
|
config.serve.listenPort || this.argv.listenPort;
|
|
570
572
|
}
|
|
571
573
|
|
|
572
|
-
this.
|
|
573
|
-
return this.
|
|
574
|
+
this.__parsedArgs = await compilerApi.getConfiguration();
|
|
575
|
+
return this.__parsedArgs;
|
|
574
576
|
},
|
|
575
577
|
|
|
576
578
|
/**
|
|
@@ -609,6 +611,15 @@ Version: v${await qx.tool.config.Utils.getQxVersion()}
|
|
|
609
611
|
}
|
|
610
612
|
},
|
|
611
613
|
|
|
614
|
+
/**
|
|
615
|
+
* Returns if the file compile.js exists
|
|
616
|
+
*
|
|
617
|
+
* @returns {Boolean}
|
|
618
|
+
*/
|
|
619
|
+
compileJsExists(){
|
|
620
|
+
return this.__compileJsExists;
|
|
621
|
+
},
|
|
622
|
+
|
|
612
623
|
/**
|
|
613
624
|
* Returns the CompilerApi instance
|
|
614
625
|
*
|
|
@@ -692,7 +703,7 @@ Version: v${await qx.tool.config.Utils.getQxVersion()}
|
|
|
692
703
|
if (data) {
|
|
693
704
|
if (data.handler === undefined) {
|
|
694
705
|
data.handler = argv =>
|
|
695
|
-
qx.tool.cli.Cli.getInstance().
|
|
706
|
+
qx.tool.cli.Cli.getInstance().setCommand(new Clazz(argv));
|
|
696
707
|
}
|
|
697
708
|
yargs.command(data);
|
|
698
709
|
}
|
|
@@ -21,6 +21,9 @@ const fs = require("fs");
|
|
|
21
21
|
const path = require("upath");
|
|
22
22
|
const chokidar = require("chokidar");
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* @ignore(setImmediate)
|
|
26
|
+
*/
|
|
24
27
|
qx.Class.define("qx.tool.cli.Watch", {
|
|
25
28
|
extend: qx.core.Object,
|
|
26
29
|
|
|
@@ -103,11 +106,9 @@ qx.Class.define("qx.tool.cli.Watch", {
|
|
|
103
106
|
}
|
|
104
107
|
config._process = null;
|
|
105
108
|
}
|
|
106
|
-
|
|
107
109
|
console.log(
|
|
108
110
|
"Starting application: " + config._cmd + " " + config._args.join(" ")
|
|
109
111
|
);
|
|
110
|
-
|
|
111
112
|
config._processPromise = new qx.Promise((resolve, reject) => {
|
|
112
113
|
let child = (config._process = require("child_process").spawn(
|
|
113
114
|
config._cmd,
|
|
@@ -229,12 +230,10 @@ qx.Class.define("qx.tool.cli.Watch", {
|
|
|
229
230
|
watcher.on("change", filename =>
|
|
230
231
|
this.__onFileChange("change", filename)
|
|
231
232
|
);
|
|
232
|
-
|
|
233
233
|
watcher.on("add", filename => this.__onFileChange("add", filename));
|
|
234
234
|
watcher.on("unlink", filename =>
|
|
235
235
|
this.__onFileChange("unlink", filename)
|
|
236
236
|
);
|
|
237
|
-
|
|
238
237
|
watcher.on("ready", () => {
|
|
239
238
|
qx.tool.compiler.Console.log(`Start watching ...`);
|
|
240
239
|
this.__watcherReady = true;
|
|
@@ -249,6 +248,9 @@ qx.Class.define("qx.tool.cli.Watch", {
|
|
|
249
248
|
});
|
|
250
249
|
});
|
|
251
250
|
});
|
|
251
|
+
process.on("beforeExit", this.__onStop.bind(this));
|
|
252
|
+
process.on("exit", this.__onStop.bind(this));
|
|
253
|
+
return this.__runningPromise;
|
|
252
254
|
},
|
|
253
255
|
|
|
254
256
|
async stop() {
|
|
@@ -352,8 +354,8 @@ qx.Class.define("qx.tool.cli.Watch", {
|
|
|
352
354
|
}
|
|
353
355
|
return null;
|
|
354
356
|
});
|
|
355
|
-
|
|
356
|
-
return
|
|
357
|
+
this.__making = runIt();
|
|
358
|
+
return this.__making;
|
|
357
359
|
},
|
|
358
360
|
|
|
359
361
|
__scheduleMake() {
|
|
@@ -33,6 +33,7 @@ qx.Class.define("qx.tool.cli.api.CompilerApi", {
|
|
|
33
33
|
construct() {
|
|
34
34
|
super();
|
|
35
35
|
this.__libraryApis = {};
|
|
36
|
+
this.__compileJsonExists = true;
|
|
36
37
|
this.addListener("changeCommand", () => {
|
|
37
38
|
this.afterCommandLoaded(this.getCommand());
|
|
38
39
|
});
|
|
@@ -101,11 +102,18 @@ qx.Class.define("qx.tool.cli.api.CompilerApi", {
|
|
|
101
102
|
let config = {};
|
|
102
103
|
if (await fs.existsAsync(compileJsonPath)) {
|
|
103
104
|
config = await qx.tool.utils.Json.loadJsonAsync(compileJsonPath);
|
|
105
|
+
} else {
|
|
106
|
+
this.__compileJsonExists = false;
|
|
107
|
+
|
|
104
108
|
}
|
|
105
109
|
this.setConfiguration(config);
|
|
106
110
|
return super.load();
|
|
107
111
|
},
|
|
108
112
|
|
|
113
|
+
compileJsonExists(){
|
|
114
|
+
return this.__compileJsonExists;
|
|
115
|
+
},
|
|
116
|
+
|
|
109
117
|
/**
|
|
110
118
|
* runs after the whole process is finished
|
|
111
119
|
* @param cmd {qx.tool.cli.commands.Command} current command
|