CB-12546: emulator specs.

This commit is contained in:
filmaj
2017-03-14 13:12:57 -07:00
parent eb6ada8091
commit 6395eda0c8
24 changed files with 655 additions and 446 deletions
+24
View File
@@ -256,6 +256,30 @@ ConfigParser.prototype = {
return this.getStaticResources(platform, 'splash');
},
/**
* Returns all resource-files for a specific platform.
* @param {string} platform Platform name
* @return {Resource[]} Array of resource file objects.
*/
getFileResources: function(platform) {
var fileResources = [];
if (platform) { // platform specific resources
fileResources = this.doc.findall('platform[@name=\'' + platform + '\']/resource-file').map(function(tag) {
return {
platform: platform,
src: tag.attrib.src,
target: tag.attrib.target,
versions: tag.attrib.versions,
deviceTarget: tag.attrib['device-target'],
arch: tag.attrib.arch
};
});
}
return fileResources;
},
/**
* Returns all hook scripts for the hook type specified.
* @param {String} hook The hook type.