浏览代码

Merge pull request #595 from rlanvin/fix-non-amd

Fix non_amd.html
JC Brand 9 年之前
父节点
当前提交
2765715f32
共有 3 个文件被更改,包括 5 次插入4 次删除
  1. 2 1
      non_amd.html
  2. 1 1
      src/converse-muc.js
  3. 2 2
      src/utils.js

+ 2 - 1
non_amd.html

@@ -47,7 +47,8 @@
     <script type="text/javascript" src="builds/locales.js"></script>
     <script type="text/javascript" src="builds/templates.js"></script>
     <script type="text/javascript" src="src/utils.js"></script>
-    <script type="text/javascript" src="converse.js"></script>
+    <script type="text/javascript" src="src/converse-core.js"></script>
+    <script type="text/javascript" src="src/converse-muc.js"></script>
 </head>
 <body id="page-top" data-spy="scroll" data-target=".navbar-custom">
     <section class="intro">

+ 1 - 1
src/converse-muc.js

@@ -19,7 +19,7 @@
         // In this case, the dependencies need to be available already as
         // global variables, and should be loaded separately via *script* tags.
         // See the file **non_amd.html** for an example of this usecase.
-        root.converse = factory(converse, utils);
+        factory(converse, utils);
     }
 }(this, function (converse_api, utils) {
     // Strophe methods for building stanzas

+ 2 - 2
src/utils.js

@@ -1,9 +1,9 @@
-/*global jQuery, templates, escape, Jed, _ */
+/*global jQuery, templates, escape, Jed, _, locales */
 (function (root, factory) {
     if (typeof define === 'function' && define.amd) {
         define(["jquery", "underscore", "converse-templates", "locales"], factory);
     } else {
-        root.utils = factory(jQuery, _, templates);
+        root.utils = factory(jQuery, _, templates, locales);
     }
 }(this, function ($, _, templates, locales) {
     "use strict";