38c9a9e10c
Builds are now themselves UMD modules, so they could be `require`'d like any other AMD module or they can still be used as old ES5 modules with globals. Additionally the build is now closured, so that the almond API doesn't pollute the global context with `define` or `require`. This does however mean that `require` can no longer be used outside of the build (unless requirej.s is included directly.
36 lines
1.5 KiB
JavaScript
36 lines
1.5 KiB
JavaScript
|
|
define('jquery', [], function () { return jQuery; });
|
|
define('jquery-private', [], function () { return jQuery; });
|
|
define('jquery.browser', [], function () { return jQuery; });
|
|
define('awesomplete', [], function () { return jQuery; });
|
|
define('lodash', [], function () { return _; });
|
|
define('moment_with_locales', [], function () { return moment; });
|
|
define('strophe', [], function () {
|
|
return {
|
|
'Strophe': Strophe,
|
|
'$build': $build,
|
|
'$iq': $iq,
|
|
'$msg': $msg,
|
|
'$pres': $pres,
|
|
'SHA1': SHA1,
|
|
'MD5': MD5,
|
|
'b64_hmac_sha1': SHA1.b64_hmac_sha1,
|
|
'b64_sha1': SHA1.b64_sha1,
|
|
'str_hmac_sha1': SHA1.str_hmac_sha1,
|
|
'str_sha1': SHA1.str_sha1
|
|
};
|
|
});
|
|
var strophePlugin = function () { return Strophe; };
|
|
var emptyFunction = function () { };
|
|
define('strophe.disco', ['strophe'], strophePlugin);
|
|
define('strophe.ping', ['strophe'], strophePlugin);
|
|
define('strophe.rsm', ['strophe'], strophePlugin);
|
|
define('strophe.vcard', ['strophe'], strophePlugin);
|
|
define('backbone', [], emptyFunction);
|
|
define('backbone.browserStorage', ['backbone'], emptyFunction);
|
|
define('backbone.overview', ['backbone'], emptyFunction);
|
|
define('otr', [], function () { return { 'DSA': DSA, 'OTR': OTR };});
|
|
define("locales", [], emptyFunction);
|
|
return require('converse');
|
|
}));
|