We're now able to make inverse.js builds

This commit is contained in:
JC Brand 2017-06-14 15:42:48 +02:00
parent 076af0970f
commit b0c20d5473
11 changed files with 2141 additions and 429 deletions

View File

@ -149,6 +149,8 @@ watch: stamp-bundler
BUILDS = dist/converse.js \
dist/converse.min.js \
dist/inverse.js \
dist/inverse.min.js \
dist/converse-mobile.js \
dist/converse-mobile.min.js \
dist/converse-muc-embedded.js \
@ -162,6 +164,10 @@ dist/converse.min.js: src locale node_modules *.js
$(RJS) -o src/build.js include=converse out=dist/converse.min.js
dist/converse.js: src locale node_modules *.js
$(RJS) -o src/build.js include=converse out=dist/converse.js optimize=none
dist/inverse.js: src locale node_modules *.js
$(RJS) -o src/build-inverse.js include=inverse out=dist/inverse.js optimize=none
dist/inverse.min.js: src locale node_modules *.js
$(RJS) -o src/build-inverse.js include=inverse out=dist/inverse.min.js
dist/converse-no-jquery.min.js: src locale node_modules *.js
$(RJS) -o src/build.js include=converse wrap.endFile=end-no-jquery.frag exclude=jquery exclude=jquery.noconflict out=dist/converse-no-jquery.min.js
dist/converse-no-jquery.js: src locale node_modules *.js

2478
dist/converse.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -11,12 +11,12 @@
<link rel="shortcut icon" type="image/ico" href="css/images/favicon.ico"/>
<link type="text/css" rel="stylesheet" media="screen" href="node_modules/bootstrap/dist/css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" media="screen" href="node_modules/font-awesome/css/font-awesome.min.css" />
<link type="text/css" rel="stylesheet" media="screen" href="https://cdn.conversejs.org/css/theme.min.css" />
<link type="text/css" rel="stylesheet" media="screen" href="https://cdn.conversejs.org/css/converse.min.css" />
<link type="text/css" rel="stylesheet" media="screen" href="css/theme.min.css" />
<link type="text/css" rel="stylesheet" media="screen" href="css/converse.min.css" />
<script type="text/javascript" src="analytics.js"></script>
<noscript><p><img src="//stats.opkode.com/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
<![if gte IE 9]>
<script src="https://cdn.conversejs.org/dist/converse.min.js"></script>
<script src="dist/converse.js"></script>
<![endif]>
</head>

View File

@ -6,9 +6,9 @@
<title>inVerse</title>
<link rel="shortcut icon" type="image/ico" href="css/images/favicon.ico"/>
<link type="text/css" rel="stylesheet" media="screen" href="css/inverse.css" />
<script src="node_modules/requirejs/require.js"></script>
<script src="src/config.js"></script>
<script src="inverse.js"></script>
<![if gte IE 9]>
<script src="dist/inverse.min.js"></script>
<![endif]>
</head>
<body>
<div class="content">
@ -21,19 +21,20 @@
</div>
</div>
<script>
require(['inverse'], function (converse) {
converse.initialize({
auto_away: 300,
i18n: 'en',
notify_all_room_messages: [
'discuss@conference.conversejs.org'
],
whitelisted_plugins: ['converse-inverse', 'converse-singleton'],
auto_reconnect: true,
bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
message_archiving: 'always',
debug: true
});
converse.initialize({
authentication: 'login',
auto_away: 300,
i18n: 'en',
auto_join_rooms: ['eee@conference.opkode.com'],
notify_all_room_messages: [
'discuss@conference.conversejs.org'
],
blacklisted_plugins: ['converse-minimize', 'converse-dragresize', 'converse-otr'],
whitelisted_plugins: ['converse-inverse', 'converse-singleton'],
auto_reconnect: true,
bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
message_archiving: 'always',
debug: true
});
</script>
</body>

9
src/build-inverse.js Normal file
View File

@ -0,0 +1,9 @@
({
baseUrl: "../",
name: "almond",
mainConfigFile: 'config.js',
wrap: {
startFile: "start.frag",
endFile: "inverse-end.frag"
}
})

View File

@ -36,6 +36,7 @@ require.config({
"strophe.rsm": "node_modules/strophejs-plugin-rsm/strophe.rsm",
"strophe.vcard": "node_modules/strophejs-plugin-vcard/strophe.vcard",
"text": "node_modules/text/text",
"tpl": "node_modules/lodash-template-loader/loader",
"typeahead": "components/typeahead.js/index",
"lodash": "node_modules/lodash/lodash",
"lodash.converter": "3rdparty/lodash.fp",
@ -104,10 +105,6 @@ require.config({
// or node_modules, depending on how moment was installed.
'location': 'node_modules/moment',
'main': 'moment'
}, {
'name': 'tpl',
'location': 'node_modules/lodash-template-loader',
'main': 'loader'
}],
map: {

View File

@ -102,7 +102,6 @@
var _converse = this._converse;
this.updateSettings({
blacklisted_plugins: ['converse-minimize', 'converse-dragresize'],
chatview_avatar_height: 44,
chatview_avatar_width: 44,
hide_open_bookmarks: true,

View File

@ -14,7 +14,7 @@ if (typeof define !== 'undefined') {
"converse-chatview", // Renders standalone chat boxes for single user chat
"converse-controlbox", // The control box
"converse-bookmarks", // XEP-0048 Bookmarks
"converse-roomslist", // XEP-0048 Bookmarks
"converse-roomslist", // Show currently open chat rooms
"converse-mam", // XEP-0313 Message Archive Management
"converse-muc", // XEP-0045 Multi-user chat
"converse-vcard", // XEP-0054 VCard-temp

8
src/inverse-end.frag Normal file
View File

@ -0,0 +1,8 @@
/* jshint ignore:start */
//The modules for your project will be inlined above
//this snippet. Ask almond to synchronously require the
//module value for 'converse' here and return it as the
//value to use for the public API for the built file.
return require('inverse');
}));
/* jshint ignore:end */

View File

@ -1,16 +1,16 @@
/* Converse.js components configuration
/* Inverse.js components configuration
*
* This file is used to tell require.js which components (or plugins) to load
* when it generates a build.
* when it generates a build of inverse.js (in dist/inverse.js)
*/
if (typeof define !== 'undefined') {
/* When running tests, define is not defined. */
define("inverse", [
// The section below determines which plugins will be included in a build
define([
"converse-core",
/* 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-chatview", // Renders standalone chat boxes for single user chat
"converse-controlbox", // The control box
"converse-bookmarks", // XEP-0048 Bookmarks
@ -23,14 +23,10 @@ if (typeof define !== 'undefined') {
"converse-ping", // XEP-0199 XMPP Ping
"converse-notification",// HTML5 Notifications
"converse-headline", // Support for headline messages
"converse-inverse", // Inverse plugin for converse.js
/* END: Removable components */
"converse-inverse", // Inverse plugin for converse.js
], function(converse) {
var $ = converse.env.jQuery;
window.converse = converse;
$(window).trigger('converse-loaded', converse);
return converse;
});
}

View File

@ -8,7 +8,7 @@
*/
/*global define */
(function (root, factory) {
define("locales", ['jed',
define(['jed',
'text!af',
'text!ca',
'text!de',