The no-jquery build was broken
This commit is contained in:
JC Brand 2016-03-07 17:52:36 +00:00
parent fd0c9cecb7
commit d4c127e196
4 changed files with 40 additions and 2 deletions

View File

@ -39,7 +39,7 @@
"underscore"
],
wrap: {
endFile: "wrapper-end.js"
endFile: ["wrapper-no-jquery.js", "wrapper-no-deps.js"]
},
insertRequire: ['converse'],
mainConfigFile: '../converse.js'

View File

@ -5,5 +5,8 @@
include: ['converse'],
exclude: ['jquery', 'jquery-private'],
insertRequire: ['converse'],
mainConfigFile: '../converse.js'
mainConfigFile: '../converse.js',
wrap: {
endFile: "wrapper-no-jquery.js"
}
})

32
src/wrapper-no-deps.js Normal file
View File

@ -0,0 +1,32 @@
/*global jQuery, _, moment, Strophe, $build, $iq, $msg, $pres, SHA1, Base64, MD5, DSA, OTR */
define('jquery.browser', [], function () { return jQuery; });
define('typeahead', [], function () { return jQuery; });
define('underscore', [], 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,
'Base64': Base64,
'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);

3
src/wrapper-no-jquery.js Normal file
View File

@ -0,0 +1,3 @@
/*global jQuery */
define('jquery', [], function () { return jQuery; });
define('jquery-private', [], function () { return jQuery; });