Remove jQuery from non-tests config
This commit is contained in:
parent
7cf9c9ef8f
commit
4652385bb4
|
@ -1,6 +1,6 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define([
|
define([
|
||||||
"jquery.noconflict",
|
"jquery",
|
||||||
"jasmine",
|
"jasmine",
|
||||||
"utils",
|
"utils",
|
||||||
"converse-core",
|
"converse-core",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils", "utils" ], factory);
|
define(["jquery", "jasmine", "mock", "converse-core", "test-utils", "utils" ], factory);
|
||||||
} (this, function ($, jasmine, mock, converse, test_utils, utils) {
|
} (this, function ($, jasmine, mock, converse, test_utils, utils) {
|
||||||
var _ = converse.env._;
|
var _ = converse.env._;
|
||||||
var $pres = converse.env.$pres;
|
var $pres = converse.env.$pres;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
||||||
} (this, function ($, jasmine, mock, converse, test_utils) {
|
} (this, function ($, jasmine, mock, converse, test_utils) {
|
||||||
var _ = converse.env._;
|
var _ = converse.env._;
|
||||||
var $pres = converse.env.$pres;
|
var $pres = converse.env.$pres;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define([
|
define([
|
||||||
"jquery.noconflict",
|
"jquery",
|
||||||
"jasmine",
|
"jasmine",
|
||||||
"converse-core",
|
"converse-core",
|
||||||
"mock",
|
"mock",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
||||||
} (this, function ($, jasmine, mock, converse, test_utils) {
|
} (this, function ($, jasmine, mock, converse, test_utils) {
|
||||||
"use strict";
|
"use strict";
|
||||||
var _ = converse.env._;
|
var _ = converse.env._;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
||||||
} (this, function ($, jasmine, mock, converse, test_utils) {
|
} (this, function ($, jasmine, mock, converse, test_utils) {
|
||||||
var _ = converse.env._;
|
var _ = converse.env._;
|
||||||
var $msg = converse.env.$msg;
|
var $msg = converse.env.$msg;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils", "utils"], factory);
|
define(["jquery", "jasmine", "mock", "converse-core", "test-utils", "utils"], factory);
|
||||||
} (this, function ($, jasmine, mock, converse, test_utils, utils) {
|
} (this, function ($, jasmine, mock, converse, test_utils, utils) {
|
||||||
"use strict";
|
"use strict";
|
||||||
var _ = converse.env._;
|
var _ = converse.env._;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
||||||
} (this, function ($, jasmine, mock, converse, test_utils) {
|
} (this, function ($, jasmine, mock, converse, test_utils) {
|
||||||
var Strophe = converse.env.Strophe;
|
var Strophe = converse.env.Strophe;
|
||||||
var b64_sha1 = converse.env.b64_sha1;
|
var b64_sha1 = converse.env.b64_sha1;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
||||||
} (this, function ($, jasmine, mock, converse, test_utils) {
|
} (this, function ($, jasmine, mock, converse, test_utils) {
|
||||||
var Strophe = converse.env.Strophe;
|
var Strophe = converse.env.Strophe;
|
||||||
var $iq = converse.env.$iq;
|
var $iq = converse.env.$iq;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
||||||
} (this, function ($, jasmine, mock, converse, test_utils) {
|
} (this, function ($, jasmine, mock, converse, test_utils) {
|
||||||
var _ = converse.env._;
|
var _ = converse.env._;
|
||||||
var $pres = converse.env.$pres;
|
var $pres = converse.env.$pres;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define([
|
define([
|
||||||
"jquery.noconflict",
|
"jquery",
|
||||||
"converse-core",
|
"converse-core",
|
||||||
"mock",
|
"mock",
|
||||||
"test_utils",
|
"test_utils",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define(["jquery.noconflict", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
define(["jquery", "jasmine", "mock", "converse-core", "test-utils"], factory);
|
||||||
} (this, function ($, jasmine, mock, converse, test_utils) {
|
} (this, function ($, jasmine, mock, converse, test_utils) {
|
||||||
|
|
||||||
return describe("The XMPPStatus model", function() {
|
return describe("The XMPPStatus model", function() {
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
include: ["converse"],
|
include: ["converse"],
|
||||||
exclude: [
|
exclude: [
|
||||||
"awesomplete",
|
"awesomplete",
|
||||||
"jquery",
|
|
||||||
"jquery.noconflict",
|
|
||||||
"backbone.browserStorage",
|
"backbone.browserStorage",
|
||||||
"backbone.overview",
|
"backbone.overview",
|
||||||
"moment",
|
"moment",
|
||||||
|
|
|
@ -31,9 +31,7 @@ require.config({
|
||||||
"form-utils": "src/form-utils",
|
"form-utils": "src/form-utils",
|
||||||
"i18n": "src/i18n",
|
"i18n": "src/i18n",
|
||||||
"jed": "node_modules/jed/jed",
|
"jed": "node_modules/jed/jed",
|
||||||
"jquery": "node_modules/jquery/dist/jquery",
|
|
||||||
"jquery.browser": "node_modules/jquery.browser/dist/jquery.browser",
|
"jquery.browser": "node_modules/jquery.browser/dist/jquery.browser",
|
||||||
"jquery.noconflict": "src/jquery.noconflict",
|
|
||||||
"lodash": "node_modules/lodash/lodash",
|
"lodash": "node_modules/lodash/lodash",
|
||||||
"lodash.converter": "3rdparty/lodash.fp",
|
"lodash.converter": "3rdparty/lodash.fp",
|
||||||
"lodash.fp": "src/lodash.fp",
|
"lodash.fp": "src/lodash.fp",
|
||||||
|
@ -106,7 +104,6 @@ require.config({
|
||||||
// '*' means all modules will get the '*.noconflict' version
|
// '*' means all modules will get the '*.noconflict' version
|
||||||
// as their dependency.
|
// as their dependency.
|
||||||
'*': {
|
'*': {
|
||||||
'jquery': 'jquery.noconflict',
|
|
||||||
'backbone': 'backbone.noconflict',
|
'backbone': 'backbone.noconflict',
|
||||||
'lodash': 'lodash.noconflict'
|
'lodash': 'lodash.noconflict'
|
||||||
},
|
},
|
||||||
|
@ -114,7 +111,6 @@ require.config({
|
||||||
// If this line was not here, there would
|
// If this line was not here, there would
|
||||||
// be an unresolvable cyclic dependency.
|
// be an unresolvable cyclic dependency.
|
||||||
'backbone.noconflict': { 'backbone': 'backbone' },
|
'backbone.noconflict': { 'backbone': 'backbone' },
|
||||||
'jquery.noconflict': { 'jquery': 'jquery' },
|
|
||||||
'lodash.noconflict': { 'lodash': 'lodash' }
|
'lodash.noconflict': { 'lodash': 'lodash' }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
4
src/jquery-stub.js
vendored
Normal file
4
src/jquery-stub.js
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
/*global define */
|
||||||
|
define([], function () {
|
||||||
|
return Object;
|
||||||
|
});
|
|
@ -1,6 +1,6 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define("mock", ['jquery.noconflict', 'converse'], factory);
|
define("mock", ['converse'], factory);
|
||||||
}(this, function ($, converse) {
|
}(this, function (converse) {
|
||||||
var _ = converse.env._;
|
var _ = converse.env._;
|
||||||
var Promise = converse.env.Promise;
|
var Promise = converse.env.Promise;
|
||||||
var Strophe = converse.env.Strophe;
|
var Strophe = converse.env.Strophe;
|
||||||
|
@ -115,7 +115,6 @@
|
||||||
}, settings || {}));
|
}, settings || {}));
|
||||||
_converse.ChatBoxViews.prototype.trimChat = function () {};
|
_converse.ChatBoxViews.prototype.trimChat = function () {};
|
||||||
window.converse_disable_effects = true;
|
window.converse_disable_effects = true;
|
||||||
$.fx.off = true;
|
|
||||||
return _converse;
|
return _converse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/*global config */
|
/*global config */
|
||||||
|
|
||||||
// Extra test dependencies
|
// Extra test dependencies
|
||||||
|
config.paths.jquery = "node_modules/jquery/dist/jquery";
|
||||||
config.paths.mock = "tests/mock";
|
config.paths.mock = "tests/mock";
|
||||||
config.paths['wait-until-promise'] = "node_modules/wait-until-promise/index";
|
config.paths['wait-until-promise'] = "node_modules/wait-until-promise/index";
|
||||||
config.paths['test-utils'] = "tests/utils";
|
config.paths['test-utils'] = "tests/utils";
|
||||||
|
@ -57,7 +58,7 @@ var specs = [
|
||||||
require(['console-reporter', 'mock', 'sinon', 'wait-until-promise', 'pluggable'],
|
require(['console-reporter', 'mock', 'sinon', 'wait-until-promise', 'pluggable'],
|
||||||
function(ConsoleReporter, mock, sinon, waitUntilPromise, pluggable) {
|
function(ConsoleReporter, mock, sinon, waitUntilPromise, pluggable) {
|
||||||
window.sinon = sinon;
|
window.sinon = sinon;
|
||||||
window.waitUntilPromise = waitUntilPromise['default'];
|
window.waitUntilPromise = waitUntilPromise.default;
|
||||||
window.localStorage.clear();
|
window.localStorage.clear();
|
||||||
window.sessionStorage.clear();
|
window.sessionStorage.clear();
|
||||||
// Load the specs
|
// Load the specs
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(function (root, factory) {
|
(function (root, factory) {
|
||||||
define(['jquery.noconflict', 'converse', 'es6-promise', 'mock', 'wait-until-promise'], factory);
|
define(['converse', 'es6-promise', 'mock', 'wait-until-promise'], factory);
|
||||||
}(this, function ($, converse_api, Promise, mock, waitUntilPromise) {
|
}(this, function (converse_api, Promise, mock, waitUntilPromise) {
|
||||||
var _ = converse_api.env._;
|
var _ = converse_api.env._;
|
||||||
var $msg = converse_api.env.$msg;
|
var $msg = converse_api.env.$msg;
|
||||||
var $pres = converse_api.env.$pres;
|
var $pres = converse_api.env.$pres;
|
||||||
|
@ -76,15 +76,13 @@
|
||||||
utils.openContactsPanel = function (converse) {
|
utils.openContactsPanel = function (converse) {
|
||||||
this.openControlBox(converse);
|
this.openControlBox(converse);
|
||||||
var cbview = converse.chatboxviews.get('controlbox');
|
var cbview = converse.chatboxviews.get('controlbox');
|
||||||
var $tabs = $(cbview.el).find('#controlbox-tabs');
|
cbview.el.querySelector('#controlbox-tabs li:first-child a').click();
|
||||||
$tabs.find('li').first().find('a')[0].click();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
utils.openRoomsPanel = function (converse) {
|
utils.openRoomsPanel = function (converse) {
|
||||||
utils.openControlBox();
|
utils.openControlBox();
|
||||||
var cbview = converse.chatboxviews.get('controlbox');
|
var cbview = converse.chatboxviews.get('controlbox');
|
||||||
var $tabs = $(cbview.el).find('#controlbox-tabs');
|
cbview.el.querySelector('#controlbox-tabs li:last-child a').click();
|
||||||
$tabs.find('li').last().find('a')[0].click();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
utils.openChatBoxes = function (converse, amount) {
|
utils.openChatBoxes = function (converse, amount) {
|
||||||
|
@ -170,7 +168,7 @@
|
||||||
|
|
||||||
utils.clearChatBoxMessages = function (converse, jid) {
|
utils.clearChatBoxMessages = function (converse, jid) {
|
||||||
var view = converse.chatboxviews.get(jid);
|
var view = converse.chatboxviews.get(jid);
|
||||||
$(view.el).find('.chat-content').empty();
|
view.el.querySelector('.chat-content').innerHTML = '';
|
||||||
view.model.messages.reset();
|
view.model.messages.reset();
|
||||||
view.model.messages.browserStorage._clear();
|
view.model.messages.browserStorage._clear();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user