62b8e9b307
The file loleaflet/build/build.html it will not work and the exported function test no longer is used anymore. Change-Id: I8f5898d38798f22987598f05a7415d81342abec5 Reviewed-on: https://gerrit.libreoffice.org/81802 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Henry Castro <hcastro@collabora.com>
43 lines
738 B
JavaScript
43 lines
738 B
JavaScript
/* -*- js-indent-level: 8 -*- */
|
|
var deps = require('./deps.js').deps;
|
|
|
|
function getFiles(compsBase32) {
|
|
var memo = {},
|
|
comps;
|
|
|
|
if (compsBase32) {
|
|
comps = parseInt(compsBase32, 32).toString(2).split('');
|
|
console.log('Managing dependencies...');
|
|
}
|
|
|
|
function addFiles(srcs) {
|
|
for (var j = 0, len = srcs.length; j < len; j++) {
|
|
memo[srcs[j]] = true;
|
|
}
|
|
}
|
|
|
|
for (var i in deps) {
|
|
if (comps) {
|
|
if (parseInt(comps.pop(), 2) === 1) {
|
|
console.log(' * ' + i);
|
|
addFiles(deps[i].src);
|
|
} else {
|
|
console.log(' ' + i);
|
|
}
|
|
} else {
|
|
addFiles(deps[i].src);
|
|
}
|
|
}
|
|
|
|
console.log('');
|
|
|
|
var files = [];
|
|
|
|
for (var src in memo) {
|
|
files.push('src/' + src);
|
|
}
|
|
|
|
return files;
|
|
}
|
|
|
|
exports.getFiles = getFiles;
|