[API] Remove bundles.json

...and make its usage optional.
This commit is contained in:
Victor Woeltjen
2016-01-08 09:54:02 -08:00
parent 1443ab61e3
commit 72c721b605
3 changed files with 34 additions and 53 deletions

View File

@ -130,7 +130,20 @@ define(
// Load all bundles named in the referenced file. The file is
// presumed to be a JSON file
function loadBundlesFromFile(listFile) {
return getJSON(listFile).then(loadBundlesFromArray);
function handleError(err) {
$log.info([
"No external bundles loaded;",
"could not load bundle listing in",
listFile,
"due to error",
err.status,
err.statusText
].join(' '));
return loadBundlesFromArray([]);
}
return getJSON(listFile)
.then(loadBundlesFromArray, handleError);
}
return Array.isArray(bundles) ? loadBundlesFromArray(bundles) :