Can we access data from Manifest.json in qooxdoo Application (ie. version number)?

一曲冷凌霜 提交于 2021-01-28 18:50:26

问题


I'm developing libraries and end-user software using the

qooxdoo framework

for 7 years now. I wonder if we can store version number in one place in Manifest.json and get it from the application to display it to users. As we use short development cycles and demo/test and serve our apps on different servers we rely extensively on version numbers to talk to users.

My question is : can we access data from Manifest.json in the application and particularly the info.version?

We currently use the generator from the

5.0.2 framework

and are migrating to

qxcompiler

and

6.0.0-alpha

framework.

Best


回答1:


After trying different keys with the qx.core.Environment object and further looking into generated code I found that all I need was under the qx.libraryInfoMap key. This environment value contains basically all the data from all Manifest.json of included libraries (including the qooxdoo framework itself). Each map key is a library name and each value the respective Manifest.json map.

For instance, accessing the version number of the project (library) myProj can be done like that:

var lim = qx.core.Environment.get('qx.libraryInfoMap'); // get the map
var ver = lim['myProj']['version']; // get the 'version' of the library 'myProj'


来源:https://stackoverflow.com/questions/54399043/can-we-access-data-from-manifest-json-in-qooxdoo-application-ie-version-number

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!