cleanup
This commit is contained in:
parent
f118db4560
commit
cf74db8e1d
3 changed files with 6 additions and 90 deletions
|
|
@ -45,16 +45,10 @@ var WorkerClient = function(topLevelNamespaces, mod, classname) {
|
|||
workerUrl = config.moduleUrl(mod, "worker");
|
||||
} else {
|
||||
var normalizePath = this.$normalizePath;
|
||||
if (typeof require.supports !== "undefined" && require.supports.indexOf("ucjs2-pinf-0") >= 0) {
|
||||
// We are running in the sourcemint loader.
|
||||
workerUrl = require.nameToUrl("ace/worker/worker_sourcemint");
|
||||
} else {
|
||||
// We are running in RequireJS.
|
||||
// nameToUrl is renamed to toUrl in requirejs 2
|
||||
if (require.nameToUrl && !require.toUrl)
|
||||
require.toUrl = require.nameToUrl;
|
||||
workerUrl = normalizePath(require.toUrl("ace/worker/worker.js", null, "_"));
|
||||
}
|
||||
// nameToUrl is renamed to toUrl in requirejs 2
|
||||
if (require.nameToUrl && !require.toUrl)
|
||||
require.toUrl = require.nameToUrl;
|
||||
workerUrl = normalizePath(require.toUrl("ace/worker/worker.js", null, "_"));
|
||||
|
||||
var tlns = {};
|
||||
topLevelNamespaces.forEach(function(ns) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue