diff --git a/.eslintrc.json b/.eslintrc.json index b688d24f1..32254892e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -165,7 +165,7 @@ "no-param-reassign": "off", "no-path-concat": "error", "no-plusplus": "off", - "no-process-env": "error", + "no-process-env": "off", "no-process-exit": "error", "no-proto": "error", "no-prototype-builtins": "error", diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst index 7b4c82b8f..9a16b2551 100644 --- a/docs/source/configuration.rst +++ b/docs/source/configuration.rst @@ -1653,7 +1653,7 @@ server for acknowledgement of those stanzas. sounds_path ----------- -* Default: ``sounds/`` +* Default: ``${assets_path}/sounds/`` This option only makes sense in conjunction with the `play_sounds`_ option and specifies the URL of the sound files to be played (exluding the file names diff --git a/package-lock.json b/package-lock.json index 7d7004dd9..c0ac45ede 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14188,7 +14188,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, "requires": { @@ -14198,7 +14198,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -14240,7 +14240,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -14259,7 +14259,7 @@ }, "meow": { "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, "requires": { @@ -19126,7 +19126,7 @@ }, "pinkie-promise": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "resolved": "http://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { @@ -20617,7 +20617,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -20630,7 +20630,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { diff --git a/src/converse-notification.js b/src/converse-notification.js index 6d5d26b8d..91f2e4f2d 100644 --- a/src/converse-notification.js +++ b/src/converse-notification.js @@ -31,7 +31,7 @@ converse.plugins.add('converse-notification', { chatstate_notification_blacklist: [], // ^ a list of JIDs to ignore concerning chat state notifications play_sounds: true, - sounds_path: 'sounds/', + sounds_path: _converse.assets_path+'/sounds/', notification_icon: 'logo/conversejs-filled.svg', notification_delay: 5000 }); diff --git a/src/headless/converse-core.js b/src/headless/converse-core.js index ffa1de26c..422c86908 100644 --- a/src/headless/converse-core.js +++ b/src/headless/converse-core.js @@ -201,6 +201,7 @@ _converse.default_connection_options = {'explicitResourceBinding': true}; // ---------------------------- _converse.default_settings = { allow_non_roster_messaging: false, + assets_path: '/dist', authentication: 'login', // Available values are "login", "prebind", "anonymous" and "external". auto_away: 0, // Seconds after which user status is set to 'away' auto_login: false, // Currently only used in connection with anonymous login @@ -210,7 +211,6 @@ _converse.default_settings = { connection_options: {}, credentials_url: null, // URL from where login credentials can be fetched csi_waiting_time: 0, // Support for XEP-0352. Seconds before client is considered idle and CSI is sent out. - loglevel: 'info', default_state: 'online', discover_connection_methods: false, geouri_regex: /https\:\/\/www.openstreetmap.org\/.*#map=[0-9]+\/([\-0-9.]+)\/([\-0-9.]+)\S*/g, @@ -218,6 +218,7 @@ _converse.default_settings = { idle_presence_timeout: 300, // Seconds after which an idle presence is sent jid: undefined, keepalive: true, + loglevel: 'info', locales: [ 'af', 'ar', 'bg', 'ca', 'cs', 'de', 'eo', 'es', 'eu', 'en', 'fr', 'gl', 'he', 'hi', 'hu', 'id', 'it', 'ja', 'nb', 'nl', 'mr', 'oc', diff --git a/webpack.common.js b/webpack.common.js index ee8368c40..8110a8cc3 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -1,11 +1,11 @@ -/* global __dirname, module */ +/* global __dirname, module, process */ const path = require('path'); +let bootstrap_ignore_modules = ['carousel', 'scrollspy']; -bootstrap_ignore_modules = ['carousel', 'scrollspy']; - -BOOTSTRAP_IGNORE_MODULES = (process.env.BOOTSTRAP_IGNORE_MODULES || '').replace(/ /g, '').trim(); -if(BOOTSTRAP_IGNORE_MODULES.length > 0) +const BOOTSTRAP_IGNORE_MODULES = (process.env.BOOTSTRAP_IGNORE_MODULES || '').replace(/ /g, '').trim(); +if (BOOTSTRAP_IGNORE_MODULES.length > 0) { bootstrap_ignore_modules = bootstrap_ignore_modules.concat(BOOTSTRAP_IGNORE_MODULES.split(',')); +} module.exports = { output: { diff --git a/webpack.prod.js b/webpack.prod.js index e223696cd..7d6855462 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -19,6 +19,7 @@ module.exports = merge(common, { }), new MiniCssExtractPlugin({filename: '../dist/converse.min.css'}), new CopyWebpackPlugin([ + {from: 'sounds'}, {from: 'images/favicon.ico'}, {from: 'images/custom_emojis', to: 'custom_emojis'}, {from: 'sass/webfonts', to: 'webfonts'}