@converse/headless: update dependencies references

* Link internal dependencies by relative path
* Don't use webpack aliases for external dependencies to reduce
user-side configuration
This commit is contained in:
cmrd Senya 2018-10-08 02:10:01 +03:00 committed by JC Brand
parent 12b9824e75
commit ae1424aa5b
14 changed files with 78 additions and 78 deletions

View File

@ -6,10 +6,10 @@
(function (root, factory) { (function (root, factory) {
define([ define([
"converse-core", "./converse-core",
"filesize", "filesize",
"utils/form", "./utils/form",
"utils/emoji" "./utils/emoji"
], factory); ], factory);
}(this, function (converse, filesize) { }(this, function (converse, filesize) {
"use strict"; "use strict";

View File

@ -6,16 +6,16 @@
(function (root, factory) { (function (root, factory) {
define(["sizzle", define(["sizzle",
"es6-promise", "es6-promise/dist/es6-promise.auto",
"lodash.noconflict", "./lodash.noconflict",
"lodash.fp", "./lodash.fp",
"polyfill", "./polyfill",
"i18n", "./i18n",
"utils/core", "./utils/core",
"moment", "moment",
"strophe.js", "strophe.js",
"pluggable", "pluggable.js/dist/pluggable",
"backbone.noconflict", "./backbone.noconflict",
"backbone.nativeview", "backbone.nativeview",
"backbone.browserStorage" "backbone.browserStorage"
], factory); ], factory);
@ -60,7 +60,7 @@
'imports': { '_': _ } 'imports': { '_': _ }
}; };
/** /**
* A private, closured object containing the private api (via `_converse.api`) * A private, closured object containing the private api (via `_converse.api`)
* as well as private methods and internal data-structures. * as well as private methods and internal data-structures.
* *
@ -1232,12 +1232,12 @@
return init_promise; return init_promise;
}; };
/** /**
* ### The private API * ### The private API
* *
* The private API methods are only accessible via the closured {@link _converse} * The private API methods are only accessible via the closured {@link _converse}
* object, which is only available to plugins. * object, which is only available to plugins.
* *
* These methods are kept private (i.e. not global) because they may return * These methods are kept private (i.e. not global) because they may return
* sensitive data which should be kept off-limits to other 3rd-party scripts * sensitive data which should be kept off-limits to other 3rd-party scripts
* that might be running in the page. * that might be running in the page.
@ -1339,14 +1339,14 @@
*/ */
'status': { 'status': {
/** Return the current user's availability status. /** Return the current user's availability status.
* *
* @method _converse.api.user.status.get * @method _converse.api.user.status.get
* @example _converse.api.user.status.get(); * @example _converse.api.user.status.get();
*/ */
'get' () { 'get' () {
return _converse.xmppstatus.get('status'); return _converse.xmppstatus.get('status');
}, },
/** /**
* The user's status can be set to one of the following values: * The user's status can be set to one of the following values:
* *
* @method _converse.api.user.status.set * @method _converse.api.user.status.set
@ -1410,7 +1410,7 @@
* *
* @method _converse.api.settings.update * @method _converse.api.settings.update
* @param {object} settings The configuration settings * @param {object} settings The configuration settings
* @example * @example
* _converse.api.settings.update({ * _converse.api.settings.update({
* 'enable_foo': true * 'enable_foo': true
* }); * });
@ -1468,14 +1468,14 @@
/** /**
* Converse and its plugins emit various events which you can listen to via the * Converse and its plugins emit various events which you can listen to via the
* {@link _converse.api.listen} namespace. * {@link _converse.api.listen} namespace.
* *
* Some of these events are also available as [ES2015 Promises](http://es6-features.org/#PromiseUsage) * Some of these events are also available as [ES2015 Promises](http://es6-features.org/#PromiseUsage)
* although not all of them could logically act as promises, since some events * although not all of them could logically act as promises, since some events
* might be fired multpile times whereas promises are to be resolved (or * might be fired multpile times whereas promises are to be resolved (or
* rejected) only once. * rejected) only once.
* *
* Events which are also promises include: * Events which are also promises include:
* *
* * [cachedRoster](/docs/html/events.html#cachedroster) * * [cachedRoster](/docs/html/events.html#cachedroster)
* * [chatBoxesFetched](/docs/html/events.html#chatBoxesFetched) * * [chatBoxesFetched](/docs/html/events.html#chatBoxesFetched)
* * [pluginsInitialized](/docs/html/events.html#pluginsInitialized) * * [pluginsInitialized](/docs/html/events.html#pluginsInitialized)
@ -1485,7 +1485,7 @@
* * [rosterInitialized](/docs/html/events.html#rosterInitialized) * * [rosterInitialized](/docs/html/events.html#rosterInitialized)
* * [statusInitialized](/docs/html/events.html#statusInitialized) * * [statusInitialized](/docs/html/events.html#statusInitialized)
* * [roomsPanelRendered](/docs/html/events.html#roomsPanelRendered) * * [roomsPanelRendered](/docs/html/events.html#roomsPanelRendered)
* *
* The various plugins might also provide promises, and they do this by using the * The various plugins might also provide promises, and they do this by using the
* `promises.add` api method. * `promises.add` api method.
* *
@ -1497,14 +1497,14 @@
* By calling `promises.add`, a new [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) * By calling `promises.add`, a new [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
* is made available for other code or plugins to depend on via the * is made available for other code or plugins to depend on via the
* {@link _converse.api.waitUntil} method. * {@link _converse.api.waitUntil} method.
* *
* Generally, it's the responsibility of the plugin which adds the promise to * Generally, it's the responsibility of the plugin which adds the promise to
* also resolve it. * also resolve it.
* *
* This is done by calling {@link _converse.api.emit}, which not only resolves the * This is done by calling {@link _converse.api.emit}, which not only resolves the
* promise, but also emits an event with the same name (which can be listened to * promise, but also emits an event with the same name (which can be listened to
* via {@link _converse.api.listen}). * via {@link _converse.api.listen}).
* *
* @method _converse.api.promises.add * @method _converse.api.promises.add
* @param {string|array} [name|names] The name or an array of names for the promise(s) to be added * @param {string|array} [name|names] The name or an array of names for the promise(s) to be added
* @example _converse.api.promises.add('foo-completed'); * @example _converse.api.promises.add('foo-completed');
@ -1542,7 +1542,7 @@
/** /**
* Converse emits events to which you can subscribe to. * Converse emits events to which you can subscribe to.
* *
* The `listen` namespace exposes methods for creating event listeners * The `listen` namespace exposes methods for creating event listeners
* (aka handlers) for these events. * (aka handlers) for these events.
* *
@ -1633,7 +1633,7 @@
/** /**
* Allows you to send XML stanzas. * Allows you to send XML stanzas.
* *
* @method _converse.api.send * @method _converse.api.send
* @example * @example
* const msg = converse.env.$msg({ * const msg = converse.env.$msg({
@ -1676,7 +1676,7 @@
const converse = { const converse = {
/** /**
* Public API method which initializes Converse. * Public API method which initializes Converse.
* This method must always be called when using Converse. * This method must always be called when using Converse.
* *
* @memberOf converse * @memberOf converse
* @method initialize * @method initialize
@ -1704,7 +1704,7 @@
/** /**
* Exposes methods for adding and removing plugins. You'll need to write a plugin * Exposes methods for adding and removing plugins. You'll need to write a plugin
* if you want to have access to the private API methods defined further down below. * if you want to have access to the private API methods defined further down below.
* *
* For more information on plugins, read the documentation on [writing a plugin](/docs/html/plugin_development.html). * For more information on plugins, read the documentation on [writing a plugin](/docs/html/plugin_development.html).
* *
* @namespace plugins * @namespace plugins
@ -1712,17 +1712,17 @@
*/ */
'plugins': { 'plugins': {
/** Registers a new plugin. /** Registers a new plugin.
* *
* @method converse.plugins.add * @method converse.plugins.add
* @param {string} name The name of the plugin * @param {string} name The name of the plugin
* @param {object} plugin The plugin object * @param {object} plugin The plugin object
* *
* @example * @example
* *
* const plugin = { * const plugin = {
* initialize: function () { * initialize: function () {
* // Gets called as soon as the plugin has been loaded. * // Gets called as soon as the plugin has been loaded.
* *
* // Inside this method, you have access to the private * // Inside this method, you have access to the private
* // API via `_covnerse.api`. * // API via `_covnerse.api`.
* *

View File

@ -7,7 +7,7 @@
/* This is a Converse plugin which add support for XEP-0030: Service Discovery */ /* This is a Converse plugin which add support for XEP-0030: Service Discovery */
(function (root, factory) { (function (root, factory) {
define(["converse-core", "sizzle"], factory); define(["./converse-core", "sizzle"], factory);
}(this, function (converse, sizzle) { }(this, function (converse, sizzle) {
const { Backbone, Promise, Strophe, $iq, b64_sha1, utils, _, f } = converse.env; const { Backbone, Promise, Strophe, $iq, b64_sha1, utils, _, f } = converse.env;
@ -508,7 +508,7 @@
'entities': { 'entities': {
/** /**
* Get the the corresponding `DiscoEntity` instance. * Get the the corresponding `DiscoEntity` instance.
* *
* @method _converse.api.disco.entities.get * @method _converse.api.disco.entities.get
* @param {string} jid The Jabber ID of the entity * @param {string} jid The Jabber ID of the entity
* @param {boolean} [create] Whether the entity should be created if it doesn't exist. * @param {boolean} [create] Whether the entity should be created if it doesn't exist.
@ -652,7 +652,7 @@
* want to know whether the user's own JID has an identity with * want to know whether the user's own JID has an identity with
* `category='pubsub'` and `type='pep'` as explained in this section of * `category='pubsub'` and `type='pep'` as explained in this section of
* XEP-0163: https://xmpp.org/extensions/xep-0163.html#support * XEP-0163: https://xmpp.org/extensions/xep-0163.html#support
* *
* @method _converse.api.disco.getIdentity * @method _converse.api.disco.getIdentity
* @param {string} The identity category. * @param {string} The identity category.
* In the XML stanza, this is the `category` * In the XML stanza, this is the `category`

View File

@ -10,8 +10,8 @@
(function (root, factory) { (function (root, factory) {
define(["sizzle", define(["sizzle",
"converse-core", "./converse-core",
"converse-disco", "./converse-disco",
"strophejs-plugin-rsm" "strophejs-plugin-rsm"
], factory); ], factory);
}(this, function (sizzle, converse) { }(this, function (sizzle, converse) {

View File

@ -6,14 +6,14 @@
(function (root, factory) { (function (root, factory) {
define([ define([
"utils/form", "./utils/form",
"converse-core", "./converse-core",
"converse-disco", "./converse-disco",
"backbone.overview", "backbone.overview/backbone.overview",
"backbone.orderedlistview", "backbone.overview/backbone.orderedlistview",
"backbone.vdomview", "backbone.vdomview",
"utils/muc", "./utils/muc",
"utils/emoji" "./utils/emoji"
], factory); ], factory);
}(this, function (u, converse) { }(this, function (u, converse) {
"use strict"; "use strict";

View File

@ -8,12 +8,12 @@
* as specified in XEP-0199 XMPP Ping. * as specified in XEP-0199 XMPP Ping.
*/ */
(function (root, factory) { (function (root, factory) {
define(["converse-core", "strophejs-plugin-ping"], factory); define(["./converse-core", "strophejs-plugin-ping"], factory);
}(this, function (converse) { }(this, function (converse) {
"use strict"; "use strict";
// Strophe methods for building stanzas // Strophe methods for building stanzas
const { Strophe, _ } = converse.env; const { Strophe, _ } = converse.env;
converse.plugins.add('converse-ping', { converse.plugins.add('converse-ping', {
initialize () { initialize () {

View File

@ -5,7 +5,7 @@
// Licensed under the Mozilla Public License (MPLv2) // Licensed under the Mozilla Public License (MPLv2)
(function (root, factory) { (function (root, factory) {
define(["converse-core", "templates/vcard.html"], factory); define(["./converse-core", "./templates/vcard.html"], factory);
}(this, function (converse, tpl_vcard) { }(this, function (converse, tpl_vcard) {
"use strict"; "use strict";
const { Backbone, Promise, Strophe, _, $iq, $build, b64_sha1, moment, sizzle } = converse.env; const { Backbone, Promise, Strophe, _, $iq, $build, b64_sha1, moment, sizzle } = converse.env;

View File

@ -4,16 +4,16 @@
if (typeof define !== 'undefined') { if (typeof define !== 'undefined') {
// The section below determines which plugins will be included in a build // The section below determines which plugins will be included in a build
define([ define([
"converse-core", "./converse-core",
/* START: Removable components /* START: Removable components
* -------------------- * --------------------
* Any of the following components may be removed if they're not needed. * Any of the following components may be removed if they're not needed.
*/ */
"converse-chatboxes", // Backbone Collection and Models for chat boxes "./converse-chatboxes", // Backbone Collection and Models for chat boxes
"converse-disco", // Service discovery plugin "./converse-disco", // Service discovery plugin
"converse-mam", // XEP-0313 Message Archive Management "./converse-mam", // XEP-0313 Message Archive Management
"converse-ping", // XEP-0199 XMPP Ping "./converse-ping", // XEP-0199 XMPP Ping
"converse-vcard", // XEP-0054 VCard-temp "./converse-vcard", // XEP-0054 VCard-temp
/* END: Removable components */ /* END: Removable components */
], function(converse) { ], function(converse) {
return converse; return converse;

View File

@ -10,9 +10,9 @@
(function (root, factory) { (function (root, factory) {
define([ define([
"es6-promise", "es6-promise/dist/es6-promise.auto",
"jed", "jed",
"lodash.noconflict", "./lodash.noconflict",
"moment", "moment",
'moment/locale/af', 'moment/locale/af',
'moment/locale/ar', 'moment/locale/ar',

View File

@ -1,4 +1,4 @@
define(['lodash', 'lodash.converter'], function (_, lodashConverter) { define(['lodash', './3rdparty/lodash.fp'], function (_, lodashConverter) {
var fp = lodashConverter(_.runInContext()); var fp = lodashConverter(_.runInContext());
return fp; return fp;
}); });

View File

@ -11,16 +11,16 @@
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
define([ define([
"sizzle", "sizzle",
"es6-promise", "es6-promise/dist/es6-promise.auto",
"fast-text-encoding", "fast-text-encoding/text",
"lodash.noconflict", "../lodash.noconflict",
"backbone", "backbone",
"strophe.js", "strophe.js",
"uri", "urijs",
"templates/audio.html", "../templates/audio.html",
"templates/file.html", "../templates/file.html",
"templates/image.html", "../templates/image.html",
"templates/video.html" "../templates/video.html"
], factory); ], factory);
} else { } else {
// Used by the mockups // Used by the mockups

File diff suppressed because one or more lines are too long

View File

@ -10,17 +10,17 @@
(function (root, factory) { (function (root, factory) {
define([ define([
"sizzle", "sizzle",
"lodash.noconflict", "../lodash.noconflict",
"utils/core", "./core",
"templates/field.html", "../templates/field.html",
"templates/select_option.html", "../templates/select_option.html",
"templates/form_select.html", "../templates/form_select.html",
"templates/form_textarea.html", "../templates/form_textarea.html",
"templates/form_checkbox.html", "../templates/form_checkbox.html",
"templates/form_username.html", "../templates/form_username.html",
"templates/form_input.html", "../templates/form_input.html",
"templates/form_captcha.html", "../templates/form_captcha.html",
"templates/form_url.html", "../templates/form_url.html",
], factory); ], factory);
}(this, function ( }(this, function (
sizzle, sizzle,

View File

@ -8,7 +8,7 @@
// //
/*global define, escape, Jed */ /*global define, escape, Jed */
(function (root, factory) { (function (root, factory) {
define(["converse-core", "utils/core"], factory); define(["../converse-core", "./core"], factory);
}(this, function (converse, u) { }(this, function (converse, u) {
"use strict"; "use strict";