Don't load lodash.fp in converse-core. It's not being used there.

This commit is contained in:
JC Brand 2017-08-15 16:36:43 +02:00
parent bfeb297ffc
commit e4d95eb794
4 changed files with 15 additions and 11 deletions

View File

@ -9,6 +9,7 @@
(function (root, factory) { (function (root, factory) {
define(["jquery.noconflict", define(["jquery.noconflict",
"converse-core", "converse-core",
"lodash.converter",
"tpl!add_contact_dropdown", "tpl!add_contact_dropdown",
"tpl!add_contact_form", "tpl!add_contact_form",
"tpl!change_status_message", "tpl!change_status_message",
@ -28,6 +29,7 @@
}(this, function ( }(this, function (
$, $,
converse, converse,
lodashConverter,
tpl_add_contact_dropdown, tpl_add_contact_dropdown,
tpl_add_contact_form, tpl_add_contact_form,
tpl_change_status_message, tpl_change_status_message,
@ -46,7 +48,8 @@
const USERS_PANEL_ID = 'users'; const USERS_PANEL_ID = 'users';
const CHATBOX_TYPE = 'chatbox'; const CHATBOX_TYPE = 'chatbox';
const { Strophe, Backbone, utils, _, fp, moment } = converse.env; const { Strophe, Backbone, utils, _, moment } = converse.env;
const fp = lodashConverter(_.runInContext());
converse.plugins.add('converse-controlbox', { converse.plugins.add('converse-controlbox', {

View File

@ -9,7 +9,6 @@
define(["sizzle", define(["sizzle",
"es6-promise", "es6-promise",
"lodash.noconflict", "lodash.noconflict",
"lodash.converter",
"polyfill", "polyfill",
"utils", "utils",
"moment_with_locales", "moment_with_locales",
@ -20,7 +19,7 @@
"backbone.overview", "backbone.overview",
], factory); ], factory);
}(this, function ( }(this, function (
sizzle, Promise, _, lodashConverter, polyfill, sizzle, Promise, _, polyfill,
utils, moment, Strophe, pluggable, Backbone) { utils, moment, Strophe, pluggable, Backbone) {
/* Cannot use this due to Safari bug. /* Cannot use this due to Safari bug.
@ -28,9 +27,6 @@
*/ */
// "use strict"; // "use strict";
// Create the FP (functional programming) version of lodash
const fp = lodashConverter(_.runInContext());
// Strophe globals // Strophe globals
const { $build, $iq, $msg, $pres } = Strophe; const { $build, $iq, $msg, $pres } = Strophe;
const b64_sha1 = Strophe.SHA1.b64_sha1; const b64_sha1 = Strophe.SHA1.b64_sha1;
@ -2357,7 +2353,6 @@
'Strophe': Strophe, 'Strophe': Strophe,
'_': _, '_': _,
'b64_sha1': b64_sha1, 'b64_sha1': b64_sha1,
'fp': fp,
'moment': moment, 'moment': moment,
'sizzle': sizzle, 'sizzle': sizzle,
'utils': utils 'utils': utils

View File

@ -13,6 +13,7 @@
define([ define([
"jquery.noconflict", "jquery.noconflict",
"converse-core", "converse-core",
"lodash.converter",
"tpl!chatarea", "tpl!chatarea",
"tpl!chatroom", "tpl!chatroom",
"tpl!chatroom_disconnect", "tpl!chatroom_disconnect",
@ -38,6 +39,7 @@
}(this, function ( }(this, function (
$, $,
converse, converse,
lodashConverter,
tpl_chatarea, tpl_chatarea,
tpl_chatroom, tpl_chatroom,
tpl_chatroom_disconnect, tpl_chatroom_disconnect,
@ -63,7 +65,8 @@
const ROOMS_PANEL_ID = 'chatrooms'; const ROOMS_PANEL_ID = 'chatrooms';
const CHATROOMS_TYPE = 'chatroom'; const CHATROOMS_TYPE = 'chatroom';
const { Strophe, Backbone, Promise, $iq, $build, $msg, $pres, b64_sha1, sizzle, utils, _, fp, moment } = converse.env; const { Strophe, Backbone, Promise, $iq, $build, $msg, $pres, b64_sha1, sizzle, utils, _, moment } = converse.env;
const fp = lodashConverter(_.runInContext());
// Add Strophe Namespaces // Add Strophe Namespaces
Strophe.addNamespace('MUC_ADMIN', Strophe.NS.MUC + "#admin"); Strophe.addNamespace('MUC_ADMIN', Strophe.NS.MUC + "#admin");

View File

@ -19,9 +19,11 @@
"tpl!form_captcha" "tpl!form_captcha"
], factory); ], factory);
}(this, function ( }(this, function (
$, sizzle, $,
sizzle,
Promise, Promise,
dummy, _, jQBrowser,
_,
locales, locales,
moment, moment,
Strophe, Strophe,
@ -34,6 +36,7 @@
tpl_form_input, tpl_form_input,
tpl_form_captcha tpl_form_captcha
) { ) {
"use strict"; "use strict";
locales = locales || {}; locales = locales || {};
const b64_sha1 = Strophe.SHA1.b64_sha1; const b64_sha1 = Strophe.SHA1.b64_sha1;
@ -399,7 +402,7 @@
/* This works around a webkit bug. Refreshes the browser's viewport, /* This works around a webkit bug. Refreshes the browser's viewport,
* otherwise chatboxes are not moved along when one is closed. * otherwise chatboxes are not moved along when one is closed.
*/ */
if ($.browser.webkit && window.requestAnimationFrame) { if (jQBrowser.webkit && window.requestAnimationFrame) {
window.requestAnimationFrame(function () { window.requestAnimationFrame(function () {
var conversejs = document.getElementById('conversejs'); var conversejs = document.getElementById('conversejs');
conversejs.style.display = 'none'; conversejs.style.display = 'none';