浏览代码

Make sure Strophe is available for other dep configs as well.

JC Brand 10 年之前
父节点
当前提交
e01f1ea59a
共有 3 个文件被更改,包括 29 次插入26 次删除
  1. 10 9
      src/deps-full.js
  2. 9 8
      src/deps-no-otr.js
  3. 10 9
      src/deps-website-no-otr.js

+ 10 - 9
src/deps-full.js

@@ -3,19 +3,20 @@ define("converse-dependencies", [
     "utils",
     "otr",
     "moment",
-    "backbone.browserStorage",
-    "backbone.overview",
-    "jquery.browser",
-    "typeahead",
     "strophe",
     "strophe.roster",
     "strophe.vcard",
-    "strophe.disco"
-], function($, utils, otr, moment) {
-    return {
+    "strophe.disco",
+    "backbone.browserStorage",
+    "backbone.overview",
+    "jquery.browser",
+    "typeahead"
+], function($, utils, otr, moment, Strophe) {
+    return _.extend({
+        'underscore': _,
         'jQuery': $,
-        'moment': moment,
         'otr': otr,
+        'moment': moment,
         'utils': utils
-    };
+    }, Strophe);
 });

+ 9 - 8
src/deps-no-otr.js

@@ -2,19 +2,20 @@ define("converse-dependencies", [
     "jquery",
     "utils",
     "moment",
-    "backbone.browserStorage",
-    "backbone.overview",
-    "jquery.browser",
-    "typeahead",
     "strophe",
     "strophe.roster",
     "strophe.vcard",
-    "strophe.disco"
-], function($, utils, moment) {
-    return {
+    "strophe.disco",
+    "backbone.browserStorage",
+    "backbone.overview",
+    "jquery.browser",
+    "typeahead"
+], function($, utils, moment, Strophe) {
+    return _.extend({
+        'underscore': _,
         'jQuery': $,
         'otr': undefined,
         'moment': moment,
         'utils': utils
-    };
+    }, Strophe);
 });

+ 10 - 9
src/deps-website-no-otr.js

@@ -2,21 +2,22 @@ define("converse-dependencies", [
     "jquery",
     "utils",
     "moment",
+    "strophe",
+    "strophe.roster",
+    "strophe.vcard",
+    "strophe.disco",
     "bootstrapJS", // XXX: Can be removed, only for https://conversejs.org
     "backbone.browserStorage",
     "backbone.overview",
     "jquery.browser",
     "jquery.easing", // XXX: Can be removed, only for https://conversejs.org
-    "typeahead",
-    "strophe",
-    "strophe.roster",
-    "strophe.vcard",
-    "strophe.disco"
-], function($, utils, moment) {
-    return {
+    "typeahead"
+], function($, utils, moment, Strophe) {
+    return _.extend({
+        'underscore': _,
         'jQuery': $,
-        'otr': undefined,
+        'otr': otr,
         'moment': moment,
         'utils': utils
-    };
+    }, Strophe);
 });