Browse Source

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

JC Brand 10 năm trước cách đây
mục cha
commit
e01f1ea59a
3 tập tin đã thay đổi với 29 bổ sung26 xóa
  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",
     "utils",
     "otr",
     "otr",
     "moment",
     "moment",
-    "backbone.browserStorage",
-    "backbone.overview",
-    "jquery.browser",
-    "typeahead",
     "strophe",
     "strophe",
     "strophe.roster",
     "strophe.roster",
     "strophe.vcard",
     "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': $,
         'jQuery': $,
-        'moment': moment,
         'otr': otr,
         'otr': otr,
+        'moment': moment,
         'utils': utils
         'utils': utils
-    };
+    }, Strophe);
 });
 });

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

@@ -2,19 +2,20 @@ define("converse-dependencies", [
     "jquery",
     "jquery",
     "utils",
     "utils",
     "moment",
     "moment",
-    "backbone.browserStorage",
-    "backbone.overview",
-    "jquery.browser",
-    "typeahead",
     "strophe",
     "strophe",
     "strophe.roster",
     "strophe.roster",
     "strophe.vcard",
     "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': $,
         'jQuery': $,
         'otr': undefined,
         'otr': undefined,
         'moment': moment,
         'moment': moment,
         'utils': utils
         'utils': utils
-    };
+    }, Strophe);
 });
 });

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

@@ -2,21 +2,22 @@ define("converse-dependencies", [
     "jquery",
     "jquery",
     "utils",
     "utils",
     "moment",
     "moment",
+    "strophe",
+    "strophe.roster",
+    "strophe.vcard",
+    "strophe.disco",
     "bootstrapJS", // XXX: Can be removed, only for https://conversejs.org
     "bootstrapJS", // XXX: Can be removed, only for https://conversejs.org
     "backbone.browserStorage",
     "backbone.browserStorage",
     "backbone.overview",
     "backbone.overview",
     "jquery.browser",
     "jquery.browser",
     "jquery.easing", // XXX: Can be removed, only for https://conversejs.org
     "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': $,
         'jQuery': $,
-        'otr': undefined,
+        'otr': otr,
         'moment': moment,
         'moment': moment,
         'utils': utils
         'utils': utils
-    };
+    }, Strophe);
 });
 });