update require.js and fix toUrl call

This commit is contained in:
nightwing 2013-03-10 17:25:07 +04:00
commit 91b42b43d3
2 changed files with 106 additions and 68 deletions

View file

@ -53,12 +53,12 @@ var WorkerClient = function(topLevelNamespaces, mod, classname) {
// nameToUrl is renamed to toUrl in requirejs 2
if (require.nameToUrl && !require.toUrl)
require.toUrl = require.nameToUrl;
workerUrl = normalizePath(require.toUrl("ace/worker/worker", null, "_"));
workerUrl = normalizePath(require.toUrl("ace/worker/worker.js", null, "_"));
}
var tlns = {};
topLevelNamespaces.forEach(function(ns) {
tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/.js(\?.*)?$/, ""));
tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, ""));
});
}