Commit eed141b5 authored by JC Brand's avatar JC Brand

Remove unnecessary path aliases from the webpack config

parent 1dac1d78
This diff is collapsed.
({
baseUrl: "../",
name: "almond",
mainConfigFile: 'config.js',
wrap: {
startFile: "start.frag",
endFile: "end.frag"
}
});
({
baseUrl: "../",
name: "almond",
out: "../dist/converse-no-dependencies.min.js",
include: ["converse"],
exclude: [
"awesomplete",
"backbone.browserStorage",
"backbone.overview",
"moment",
"strophe",
"strophe.rsm",
"strophe.ping",
"otr",
"lodash",
"lodash.converter",
"lodash.noconflict",
"es6-promise"
],
paths: {
"backbone.vdomview": "builds/backbone.vdomview",
"converse-bookmarks": "builds/converse-bookmarks",
"converse-chatboxes": "builds/converse-chatboxes",
"converse-chatview": "builds/converse-chatview",
"converse-controlbox": "builds/converse-controlbox",
"converse-core": "builds/converse-core",
"converse-disco": "builds/converse-disco",
"converse-dragresize": "builds/converse-dragresize",
"converse-embedded": "builds/converse-embedded",
"converse-fullscreen": "builds/converse-fullscreen",
"converse-headline": "builds/converse-headline",
"converse-mam": "builds/converse-mam",
"converse-minimize": "builds/converse-minimize",
"converse-muc": "builds/converse-muc",
"converse-notification": "builds/converse-notification",
"converse-otr": "builds/converse-otr",
"converse-ping": "builds/converse-ping",
"converse-profile": "builds/converse-profile",
"converse-register": "builds/converse-register",
"converse-roomslist": "builds/converse-roomslist",
"converse-rosterview": "builds/converse-rosterview",
"converse-singleton": "builds/converse-singleton",
"converse-vcard": "builds/converse-vcard",
"form-utils": "builds/utils/form",
"i18n": "builds/i18n",
"utils": "builds/utils/core",
"muc-utils": "builds/utils/muc"
},
wrap: {
startFile: "start.frag",
endFile: "end-no-dependencies.frag"
},
mainConfigFile: "config.js"
});
({
baseUrl: "../",
name: "almond",
mainConfigFile: 'config.js',
paths: {
"backbone.vdomview": "builds/backbone.vdomview",
"converse-bookmarks": "builds/converse-bookmarks",
"converse-caps": "builds/converse-caps",
"converse-chatboxes": "builds/converse-chatboxes",
"converse-chatview": "builds/converse-chatview",
"converse-controlbox": "builds/converse-controlbox",
"converse-core": "builds/converse-core",
"converse-disco": "builds/converse-disco",
"converse-dragresize": "builds/converse-dragresize",
"converse-embedded": "builds/converse-embedded",
"converse-fullscreen": "builds/converse-fullscreen",
"converse-headline": "builds/converse-headline",
"converse-mam": "builds/converse-mam",
"converse-message-view": "builds/converse-message-view",
"converse-minimize": "builds/converse-minimize",
"converse-modal": "builds/converse-modal",
"converse-muc": "builds/converse-muc",
"converse-muc-views": "builds/converse-muc-views",
"converse-notification": "builds/converse-notification",
"converse-otr": "builds/converse-otr",
"converse-ping": "builds/converse-ping",
"converse-profile": "builds/converse-profile",
"converse-register": "builds/converse-register",
"converse-roomslist": "builds/converse-roomslist",
"converse-roster": "builds/converse-roster",
"converse-rosterview": "builds/converse-rosterview",
"converse-singleton": "builds/converse-singleton",
"converse-vcard": "builds/converse-vcard",
"form-utils": "builds/utils/form",
"i18n": "builds/i18n",
"muc-utils": "builds/utils/muc",
"utils": "builds/utils/core"
},
wrap: {
startFile: "start.frag",
endFile: "end.frag"
}
});
var config;
if (typeof(require) === 'undefined') {
/* XXX: Hack to work around r.js's stupid parsing.
* We want to save the configuration in a variable so that we can reuse it in
* tests/main.js.
*/
// eslint-disable-next-line
require = { // jshint ignore:line
config: function (c) {
config = c;
}
};
}
require.config({
baseUrl: '.',
paths: {
"IPv6": "node_modules/urijs/src/IPv6",
"SecondLevelDomains": "node_modules/urijs/src/SecondLevelDomains",
"almond": "node_modules/almond/almond",
"awesomplete": "node_modules/awesomplete-avoid-xss/awesomplete",
"babel": "node_modules/requirejs-babel/babel-5.8.34.min",
"backbone": "node_modules/backbone/backbone",
"backbone.browserStorage": "node_modules/backbone.browserStorage/backbone.browserStorage",
"backbone.nativeview": "node_modules/backbone.nativeview/backbone.nativeview",
"backbone.noconflict": "src/backbone.noconflict",
"backbone.orderedlistview": "node_modules/backbone.overview/dist/backbone.orderedlistview",
"backbone.overview": "node_modules/backbone.overview/dist/backbone.overview",
"backbone.vdomview": "node_modules/backbone.vdomview/dist/backbone.vdomview",
"bootstrap": "node_modules/bootstrap.native/dist/bootstrap-native-v4",
"emojione": "node_modules/emojione/lib/js/emojione",
"es6-promise": "node_modules/es6-promise/dist/es6-promise.auto",
"eventemitter": "node_modules/otr/build/dep/eventemitter",
"filesize": "node_modules/filesize/lib/filesize",
"form-utils": "src/utils/form",
"i18n": "src/i18n",
"jed": "node_modules/jed/jed",
"jquery": "src/jquery-stub",
"lodash": "node_modules/lodash/lodash",
"lodash.converter": "3rdparty/lodash.fp",
"lodash.fp": "src/lodash.fp",
"lodash.noconflict": "src/lodash.noconflict",
"message-utils": "src/utils/message",
"muc-utils": "src/utils/muc",
"pluggable": "node_modules/pluggable.js/dist/pluggable",
"polyfill": "src/polyfill",
"punycode": "node_modules/urijs/src/punycode",
"sizzle": "node_modules/sizzle/dist/sizzle",
"snabbdom": "node_modules/snabbdom/dist/snabbdom",
"snabbdom-attributes": "node_modules/snabbdom/dist/snabbdom-attributes",
"snabbdom-class": "node_modules/snabbdom/dist/snabbdom-class",
"snabbdom-dataset": "node_modules/snabbdom/dist/snabbdom-dataset",
"snabbdom-eventlisteners": "node_modules/snabbdom/dist/snabbdom-eventlisteners",
"snabbdom-props": "node_modules/snabbdom/dist/snabbdom-props",
"snabbdom-style": "node_modules/snabbdom/dist/snabbdom-style",
"strophe": "node_modules/strophe.js/strophe",
"strophe.ping": "node_modules/strophejs-plugin-ping/strophe.ping",
"strophe.rsm": "node_modules/strophejs-plugin-rsm/strophe.rsm",
"text": "node_modules/text/text",
"tovnode": "node_modules/snabbdom/dist/tovnode",
"tpl": "node_modules/lodash-template-loader/loader",
"underscore": "src/underscore-shim",
"uri": "node_modules/urijs/src/URI",
"utils": "src/utils/core",
"vdom-parser": "node_modules/vdom-parser/dist",
"xss": "node_modules/xss/dist/xss",
"xss.noconflict": "src/xss.noconflict",
// Converse
"converse": "src/converse",
"converse-bookmarks": "src/converse-bookmarks",
"converse-chatboxes": "src/converse-chatboxes",
"converse-caps": "src/converse-caps",
"converse-chatview": "src/converse-chatview",
"converse-controlbox": "src/converse-controlbox",
"converse-core": "src/converse-core",
"converse-disco": "src/converse-disco",
"converse-dragresize": "src/converse-dragresize",
"converse-embedded": "src/converse-embedded",
"converse-fullscreen": "src/converse-fullscreen",
"converse-headline": "src/converse-headline",
"converse-mam": "src/converse-mam",
"converse-message-view": "src/converse-message-view",
"converse-minimize": "src/converse-minimize",
"converse-modal": "src/converse-modal",
"converse-muc": "src/converse-muc",
"converse-muc-views": "src/converse-muc-views",
"converse-notification": "src/converse-notification",
"converse-otr": "src/converse-otr",
"converse-ping": "src/converse-ping",
"converse-profile": "src/converse-profile",
"converse-register": "src/converse-register",
"converse-roomslist": "src/converse-roomslist",
"converse-roster": "src/converse-roster",
"converse-rosterview": "src/converse-rosterview",
"converse-singleton": "src/converse-singleton",
"converse-vcard": "src/converse-vcard",
// Off-the-record-encryption
// "bigint": "node_modules/otr/build/dep/bigint",
"bigint": "3rdparty/bigint",
"crypto": "node_modules/otr/build/dep/crypto",
"salsa20": "node_modules/otr/build/dep/salsa20",
"otr": "node_modules/otr/build/otr",
},
packages: [{
'name': 'moment',
'location': 'node_modules/moment',
'main': 'moment'
}],
map: {
// '*' means all modules will get the '*.noconflict' version
// as their dependency.
'*': {
'backbone': 'backbone.noconflict',
'lodash': 'lodash.noconflict'
},
// '*.noconflict' wants the real module
// If this line was not here, there would
// be an unresolvable cyclic dependency.
'backbone.noconflict': { 'backbone': 'backbone' },
'lodash.noconflict': { 'lodash': 'lodash' }
},
lodashLoader: {
// Configuration for requirejs-tpl
// Use Mustache style syntax for variable interpolation
root: "src/templates/",
templateSettings: {
"escape": /\{\{\{([\s\S]+?)\}\}\}/g,
"evaluate": /\{\[([\s\S]+?)\]\}/g,
"interpolate": /\{\{([\s\S]+?)\}\}/g,
// By default, template places the values from your data in the
// local scope via the with statement. However, you can specify
// a single variable name with the variable setting. This can
// significantly improve the speed at which a template is able
// to render.
"variable": 'o'
}
},
// define module dependencies for modules not using define
shim: {
'backbone.orderedlistview': { deps: ['backbone.nativeview'] },
'backbone.overview': { deps: ['backbone.nativeview'] },
'backbone.vdomview': { deps: ['backbone.nativeview'] },
'awesomplete': { exports: 'Awesomplete'},
'emojione': { exports: 'emojione'},
'xss': {
'init': function (xss_noconflict) {
return {
filterXSS: window.filterXSS,
filterCSS: window.filterCSS
}
}
}
}
});
......@@ -11,7 +11,7 @@
"filesize",
"templates/chatboxes.html",
"backbone.overview",
"form-utils"
"utils/form"
], factory);
}(this, function (converse, emojione, filesize, tpl_chatboxes) {
"use strict";
......
......@@ -11,7 +11,7 @@
"lodash.fp",
"polyfill",
"i18n",
"utils",
"utils/core",
"moment",
"strophe",
"pluggable",
......
......@@ -11,14 +11,14 @@
(function (root, factory) {
define(["sizzle",
"converse-core",
"utils",
"converse-disco",
"strophe.rsm"
], factory);
}(this, function (sizzle, converse, utils) {
}(this, function (sizzle, converse) {
"use strict";
const CHATROOMS_TYPE = 'chatroom';
const { Promise, Strophe, $iq, _, moment } = converse.env;
const u = converse.env.utils;
const RSM_ATTRIBUTES = ['max', 'first', 'last', 'after', 'before', 'index', 'count'];
// XEP-0313 Message Archive Management
......@@ -153,7 +153,7 @@
*/
if (this.disable_mam) { return; }
const { _converse } = this.__super__,
most_recent_msg = utils.getMostRecentMessage(this.model);
most_recent_msg = u.getMostRecentMessage(this.model);
if (_.isNil(most_recent_msg)) {
this.fetchArchivedMessages();
......
// Converse.js
// https://conversejs.org
//
// Copyright (c) 2012-2018, the Converse.js developers
// Copyright (c) 2013-2018, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
(function (root, factory) {
......
......@@ -7,7 +7,7 @@
(function (root, factory) {
define([
"converse-core",
"muc-utils",
"utils/muc",
"templates/add_chatroom_modal.html",
"templates/chatarea.html",
"templates/chatroom.html",
......
......@@ -6,14 +6,14 @@
(function (root, factory) {
define([
"form-utils",
"utils/form",
"converse-core",
"emojione",
"converse-disco",
"backbone.overview",
"backbone.orderedlistview",
"backbone.vdomview",
"muc-utils"
"utils/muc"
], factory);
}(this, function (u, converse, emojione) {
"use strict";
......
// Converse.js (A browser based XMPP chat client)
// http://conversejs.org
// Converse.js
// https://conversejs.org
//
// Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
// Copyright (c) 2013-2018, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
//
/*global define */
/* This is a Converse.js plugin which add support for application-level pings
* as specified in XEP-0199 XMPP Ping.
......
......@@ -10,7 +10,7 @@
* as specified in XEP-0077.
*/
(function (root, factory) {
define(["form-utils",
define(["utils/form",
"converse-core",
"templates/form_username.html",
"templates/register_link.html",
......
......@@ -10,13 +10,12 @@
* rooms in the "Rooms Panel" of the ControlBox.
*/
(function (root, factory) {
define(["utils",
"converse-core",
define(["converse-core",
"converse-muc",
"templates/rooms_list.html",
"templates/rooms_list_item.html"
], factory);
}(this, function (utils, converse, muc, tpl_rooms_list, tpl_rooms_list_item) {
}(this, function (converse, muc, tpl_rooms_list, tpl_rooms_list_item) {
const { Backbone, Promise, Strophe, b64_sha1, sizzle, _ } = converse.env;
const u = converse.env.utils;
......@@ -247,13 +246,13 @@
if (ev && ev.preventDefault) { ev.preventDefault(); }
const icon_el = ev.target.querySelector('.fa');
if (icon_el.classList.contains("fa-caret-down")) {
utils.slideIn(this.el.querySelector('.open-rooms-list')).then(() => {
u.slideIn(this.el.querySelector('.open-rooms-list')).then(() => {
this.list_model.save({'toggle-state': _converse.CLOSED});
icon_el.classList.remove("fa-caret-down");
icon_el.classList.add("fa-caret-right");
});
} else {
utils.slideOut(this.el.querySelector('.open-rooms-list')).then(() => {
u.slideOut(this.el.querySelector('.open-rooms-list')).then(() => {
this.list_model.save({'toggle-state': _converse.OPENED});
icon_el.classList.remove("fa-caret-right");
icon_el.classList.add("fa-caret-down");
......
......@@ -8,7 +8,7 @@ if (typeof define !== 'undefined') {
* Any of the following components may be removed if they're not needed.
*/
"converse-bookmarks", // XEP-0048 Bookmarks
"converse-caps",
"converse-caps", // XEP-0115 Entity Capabilities
"converse-chatview", // Renders standalone chat boxes for single user chat
"converse-controlbox", // The control box
"converse-dragresize", // Allows chat boxes to be resized by dragging them
......
......@@ -11,7 +11,7 @@
define([
"sizzle",
"lodash.noconflict",
"utils",
"utils/core",
"templates/field.html",
"templates/select_option.html",
"templates/form_select.html",
......
......@@ -8,7 +8,7 @@
//
/*global define, escape, Jed */
(function (root, factory) {
define(["converse-core", "utils"], factory);
define(["converse-core", "utils/core"], factory);
}(this, function (converse, u) {
"use strict";
......
......@@ -71,9 +71,10 @@ const config = {
}],
},
resolve: {
extensions: ['.js'],
modules: [
'node_modules',
path.resolve(__dirname, "src"),
path.resolve(__dirname, "src")
],
alias: {
"IPv6": path.resolve(__dirname, "node_modules/urijs/src/IPv6"),
......@@ -82,7 +83,6 @@ const config = {
"backbone": path.resolve(__dirname, "node_modules/backbone/backbone"),
"backbone.browserStorage": path.resolve(__dirname, "node_modules/backbone.browserStorage/backbone.browserStorage"),
"backbone.nativeview": path.resolve(__dirname, "node_modules/backbone.nativeview/backbone.nativeview"),
"backbone.noconflict": path.resolve(__dirname, "src/backbone.noconflict"),
"backbone.orderedlistview": path.resolve(__dirname, "node_modules/backbone.overview/dist/backbone.orderedlistview"),
"backbone.overview": path.resolve(__dirname, "node_modules/backbone.overview/dist/backbone.overview"),
"backbone.vdomview": path.resolve(__dirname, "node_modules/backbone.vdomview/dist/backbone.vdomview"),
......@@ -91,18 +91,13 @@ const config = {
"emojione": path.resolve(__dirname, "node_modules/emojione/lib/js/emojione"),
"es6-promise": path.resolve(__dirname, "node_modules/es6-promise/dist/es6-promise.auto"),
"filesize": path.resolve(__dirname, "node_modules/filesize/lib/filesize"),
"form-utils": path.resolve(__dirname, "src/utils/form"),
"i18n": path.resolve(__dirname, "src/i18n"),
"utils/form": path.resolve(__dirname, "src/utils/form"),
"jed": path.resolve(__dirname, "node_modules/jed/jed"),
"jquery": path.resolve(__dirname, "src/jquery-stub"),
"lodash": path.resolve(__dirname, "node_modules/lodash/lodash"),
"lodash.converter": path.resolve(__dirname, "3rdparty/lodash.fp"),
"lodash.fp": path.resolve(__dirname, "src/lodash.fp"),
"lodash.noconflict": path.resolve(__dirname, "src/lodash.noconflict"),
"message-utils": path.resolve(__dirname, "src/utils/message"),
"muc-utils": path.resolve(__dirname, "src/utils/muc"),
"utils/muc": path.resolve(__dirname, "src/utils/muc"),
"pluggable": path.resolve(__dirname, "node_modules/pluggable.js/dist/pluggable"),
"polyfill": path.resolve(__dirname, "src/polyfill"),
"punycode": path.resolve(__dirname, "node_modules/urijs/src/punycode"),
"sizzle": path.resolve(__dirname, "node_modules/sizzle/dist/sizzle"),
"snabbdom": path.resolve(__dirname, "node_modules/snabbdom/dist/snabbdom"),
......@@ -118,37 +113,9 @@ const config = {
"tovnode": path.resolve(__dirname, "node_modules/snabbdom/dist/tovnode"),
"underscore": path.resolve(__dirname, "src/underscore-shim"),
"uri": path.resolve(__dirname, "node_modules/urijs/src/URI"),
"utils": path.resolve(__dirname, "src/utils/core"),
"utils/core": path.resolve(__dirname, "src/utils/core"),
"vdom-parser": path.resolve(__dirname, "node_modules/vdom-parser/dist"),
"xss": path.resolve(__dirname, "node_modules/xss/dist/xss"),
"xss.noconflict": path.resolve(__dirname, "node_modules/xss.noconflict"),
"converse-bookmarks": path.resolve(__dirname, "src/converse-bookmarks"),
"converse-chatboxes": path.resolve(__dirname, "src/converse-chatboxes"),
"converse-caps": path.resolve(__dirname, "src/converse-caps"),
"converse-chatview": path.resolve(__dirname, "src/converse-chatview"),
"converse-controlbox": path.resolve(__dirname, "src/converse-controlbox"),
"converse-core": path.resolve(__dirname, "src/converse-core"),
"converse-disco": path.resolve(__dirname, "src/converse-disco"),
"converse-dragresize": path.resolve(__dirname, "src/converse-dragresize"),
"converse-embedded": path.resolve(__dirname, "src/converse-embedded"),
"converse-fullscreen": path.resolve(__dirname, "src/converse-fullscreen"),
"converse-headline": path.resolve(__dirname, "src/converse-headline"),
"converse-mam": path.resolve(__dirname, "src/converse-mam"),
"converse-message-view": path.resolve(__dirname, "src/converse-message-view"),
"converse-minimize": path.resolve(__dirname, "src/converse-minimize"),
"converse-modal": path.resolve(__dirname, "src/converse-modal"),
"converse-muc": path.resolve(__dirname, "src/converse-muc"),
"converse-muc-views": path.resolve(__dirname, "src/converse-muc-views"),
"converse-notification": path.resolve(__dirname, "src/converse-notification"),
"converse-ping": path.resolve(__dirname, "src/converse-ping"),
"converse-profile": path.resolve(__dirname, "src/converse-profile"),
"converse-register": path.resolve(__dirname, "src/converse-register"),
"converse-roomslist": path.resolve(__dirname, "src/converse-roomslist"),
"converse-roster": path.resolve(__dirname, "src/converse-roster"),
"converse-rosterview": path.resolve(__dirname, "src/converse-rosterview"),
"converse-singleton": path.resolve(__dirname, "src/converse-singleton"),
"converse-vcard": path.resolve(__dirname, "src/converse-vcard")
"xss": path.resolve(__dirname, "node_modules/xss/dist/xss")
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment