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

Fix non_amd.html
This commit is contained in:
JC Brand 2016-02-17 15:14:00 +01:00
commit 2765715f32
3 changed files with 5 additions and 4 deletions

3
non_amd.html Normal file → Executable file
View File

@ -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">

2
src/converse-muc.js Normal file → Executable file
View File

@ -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

4
src/utils.js Normal file → Executable file
View File

@ -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";