@@ -24,6 +24,13 @@ require = function (require) {
// e.g. http://app.com/index.html -> http://app.com/
var document_home = window.location.href.replace(/\/[^\/]+$/, "");
+ // at the present moment, bower tries to have flat hierarchy,
+ // which leads to two possible scenarios:
+ // 1. amber itself was deployed via bower,
+ // its libraries are next to it; document_home from above covers this
+ // 2. amber was deployed in different fashion,
+ // its libraries are included by bower locally; document_home is fixed above
+ // The detection is done by looking for '/bower_components/' in amber path.
if (!amber_home.match(/\/bower_components\//)) {
document_home = amber_home;
}