3 var cdn = require('gitter-web-cdn');
5 function cdnSubResources(resources, jsRoot) {
8 resourceList = resourceList.concat(resources);
13 return cdn(jsRoot + '/' + f + '.js');
15 .concat(cdn('fonts/sourcesans/SourceSansPro-Regular.otf.woff'));
18 var SUBRESOURCE_MAPPINGS = {};
20 var CACHED_SUBRESOURCES = Object.keys(SUBRESOURCE_MAPPINGS).reduce(function(memo, key) {
21 memo[key] = cdnSubResources(SUBRESOURCE_MAPPINGS[key], 'js');
25 function getSubResources(entryPoint, jsRoot) {
27 return CACHED_SUBRESOURCES[entryPoint];
30 return cdnSubResources(SUBRESOURCE_MAPPINGS[entryPoint], jsRoot);
33 module.exports = getSubResources;