
/* jshint -W117 : true, -W098 : true */
var request = require("noder-js/request");
var currentContext = require("noder-js/currentContext");
var modulesToExecute = [];
var syncRequire = function (logicalPath) {
    var url = Aria.rootFolderPath + logicalPath;
    request(url, {
        sync : true
    }).thenSync(function (xhr) {
        var newModule = currentContext.jsModuleDefine(xhr.responseText, logicalPath, url);
        modulesToExecute.push(newModule);
    }).done();
};

// The following content is replaced at build time by a set of calls to syncRequire
// for each file to be included in the bootstrap
$CONTENT$;

// Once everything is in the cache, let's execute all modules:
for (var i = 0, l = modulesToExecute.length; i < l ; i++) {
    currentContext.moduleExecuteSync(modulesToExecute[i]);
}
modulesToExecute = null;
