问题
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