mark modules as packaged
This commit is contained in:
parent
3e88268332
commit
47aa0d88c9
2 changed files with 6 additions and 5 deletions
|
|
@ -143,7 +143,8 @@ var lookup = function(parentId, moduleName) {
|
||||||
var mod = {
|
var mod = {
|
||||||
id: moduleName,
|
id: moduleName,
|
||||||
uri: '',
|
uri: '',
|
||||||
exports: exports
|
exports: exports,
|
||||||
|
packaged: true
|
||||||
};
|
};
|
||||||
|
|
||||||
var req = function(module, callback) {
|
var req = function(module, callback) {
|
||||||
|
|
|
||||||
|
|
@ -40,11 +40,11 @@ define(function(require, exports, module) {
|
||||||
var oop = require("../lib/oop");
|
var oop = require("../lib/oop");
|
||||||
var EventEmitter = require("../lib/event_emitter").EventEmitter;
|
var EventEmitter = require("../lib/event_emitter").EventEmitter;
|
||||||
|
|
||||||
var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) {
|
var WorkerClient = function(topLevelNamespaces, packagedJs, mod, classname) {
|
||||||
|
|
||||||
this.changeListener = this.changeListener.bind(this);
|
this.changeListener = this.changeListener.bind(this);
|
||||||
|
|
||||||
if (window.require.packaged) {
|
if (module.packaged) {
|
||||||
var base = this.$guessBasePath();
|
var base = this.$guessBasePath();
|
||||||
this.$worker = new Worker(base + packagedJs);
|
this.$worker = new Worker(base + packagedJs);
|
||||||
}
|
}
|
||||||
|
|
@ -64,7 +64,7 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) {
|
||||||
this.$worker.postMessage({
|
this.$worker.postMessage({
|
||||||
init : true,
|
init : true,
|
||||||
tlns: tlns,
|
tlns: tlns,
|
||||||
module: module,
|
module: mod,
|
||||||
classname: classname
|
classname: classname
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -128,7 +128,7 @@ var WorkerClient = function(topLevelNamespaces, packagedJs, module, classname) {
|
||||||
if (!src) {
|
if (!src) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace-uncompressed\.js)(?:\?|$)/);
|
var m = src.match(/^(?:(.*\/)ace\.js|(.*\/)ace(-uncompressed)?(-noconflict)?\.js)(?:\?|$)/);
|
||||||
if (m)
|
if (m)
|
||||||
return m[1] || m[2];
|
return m[1] || m[2];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue