Create a mobile-specific build of converse.js

This build doesn't include the converse-minimize and converse-dragresize
components.

Also regenerated the other builds.
This commit is contained in:
JC Brand 2016-04-01 13:33:14 +00:00
parent 4ae29e188b
commit 3787a34435
9 changed files with 49032 additions and 2186 deletions

2
.gitignore vendored
View File

@ -51,7 +51,9 @@ dist/converse-no-otr.min.js
dist/converse.min.js dist/converse.min.js
dist/converse.nojquery.js dist/converse.nojquery.js
dist/converse.nojquery.min.js dist/converse.nojquery.min.js
dist/converse-mobile.min.js
css/converse.css.map css/converse.css.map
css/converse.min.css
.sv? .sv?

View File

@ -19,6 +19,7 @@ SOURCES = $(wildcard *.js) $(wildcard spec/*.js) $(wildcard src/*.js)
JSHINTEXCEPTIONS = $(GENERATED) \ JSHINTEXCEPTIONS = $(GENERATED) \
src/otr.js \ src/otr.js \
src/crypto.js \ src/crypto.js \
src/build-mobile.js \
src/build-no-jquery.js \ src/build-no-jquery.js \
src/build-no-dependencies.js \ src/build-no-dependencies.js \
src/build.js \ src/build.js \
@ -137,6 +138,8 @@ watch: stamp-bundler
BUILDS = dist/converse.js \ BUILDS = dist/converse.js \
dist/converse.min.js \ dist/converse.min.js \
dist/converse-mobile.js \
dist/converse-mobile.min.js \
dist/converse.nojquery.js \ dist/converse.nojquery.js \
dist/converse.nojquery.min.js \ dist/converse.nojquery.min.js \
dist/converse-no-dependencies.min.js \ dist/converse-no-dependencies.min.js \
@ -154,6 +157,10 @@ dist/converse-no-dependencies.min.js: stamp-bower src locale components *.js
$(RJS) -o src/build-no-dependencies.js $(RJS) -o src/build-no-dependencies.js
dist/converse-no-dependencies.js: stamp-bower src locale components *.js dist/converse-no-dependencies.js: stamp-bower src locale components *.js
$(RJS) -o src/build-no-dependencies.js optimize=none out=dist/converse-no-dependencies.js $(RJS) -o src/build-no-dependencies.js optimize=none out=dist/converse-no-dependencies.js
dist/converse-mobile.min.js: stamp-bower src locale components *.js
$(RJS) -o src/build-mobile.js
dist/converse-mobile.js: stamp-bower src locale components *.js
$(RJS) -o src/build-mobile.js optimize=none out=dist/converse-mobile.js
.PHONY: jsmin .PHONY: jsmin
jsmin: $(BUILDS) jsmin: $(BUILDS)

46357
dist/converse-mobile.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

2484
dist/converse.js vendored

File diff suppressed because it is too large Load Diff

25
dist/templates.js vendored
View File

@ -112,8 +112,6 @@ function print() { __p += __j.call(arguments, '') }
with (obj) { with (obj) {
__p += '<div class="flyout box-flyout">\n <div class="dragresize dragresize-top"></div>\n <div class="dragresize dragresize-topleft"></div>\n <div class="dragresize dragresize-left"></div>\n <div class="chat-head chat-head-chatbox">\n <a class="chatbox-btn close-chatbox-button icon-close" title="' + __p += '<div class="flyout box-flyout">\n <div class="dragresize dragresize-top"></div>\n <div class="dragresize dragresize-topleft"></div>\n <div class="dragresize dragresize-left"></div>\n <div class="chat-head chat-head-chatbox">\n <a class="chatbox-btn close-chatbox-button icon-close" title="' +
((__t = (info_close)) == null ? '' : __t) + ((__t = (info_close)) == null ? '' : __t) +
'"></a>\n <a class="chatbox-btn toggle-chatbox-button icon-minus" title="' +
((__t = (info_minimize)) == null ? '' : __t) +
'"></a>\n <div class="chat-title">\n '; '"></a>\n <div class="chat-title">\n ';
if (url) { ; if (url) { ;
__p += '\n <a href="' + __p += '\n <a href="' +
@ -142,11 +140,23 @@ __p += '\n </div>\n</div>\n';
return __p return __p
}; };
this["templates"]["chatbox_minimize"] = function(obj) {
obj || (obj = {});
var __t, __p = '', __e = _.escape;
with (obj) {
__p += '<a class="chatbox-btn toggle-chatbox-button icon-minus" title="' +
((__t = (info_minimize)) == null ? '' : __t) +
'"></a>\n';
}
return __p
};
this["templates"]["chatroom"] = function(obj) { this["templates"]["chatroom"] = function(obj) {
obj || (obj = {}); obj || (obj = {});
var __t, __p = '', __e = _.escape; var __t, __p = '', __e = _.escape;
with (obj) { with (obj) {
__p += '<div class="flyout box-flyout">\n <div class="dragresize dragresize-top"></div>\n <div class="dragresize dragresize-topleft"></div>\n <div class="dragresize dragresize-left"></div>\n <div class="chat-head chat-head-chatroom">\n <a class="chatbox-btn close-chatbox-button icon-close"></a>\n <a class="chatbox-btn toggle-chatbox-button icon-minus"></a>\n <a class="chatbox-btn configure-chatroom-button icon-wrench" style="display:none"></a>\n <div class="chat-title"> ' + __p += '<div class="flyout box-flyout">\n <div class="dragresize dragresize-top"></div>\n <div class="dragresize dragresize-topleft"></div>\n <div class="dragresize dragresize-left"></div>\n <div class="chat-head chat-head-chatroom">\n <a class="chatbox-btn close-chatbox-button icon-close"></a>\n <a class="chatbox-btn configure-chatroom-button icon-wrench" style="display:none"></a>\n <div class="chat-title"> ' +
((__t = ( _.escape(name) )) == null ? '' : __t) + ((__t = ( _.escape(name) )) == null ? '' : __t) +
' </div>\n <p class="chatroom-topic"><p/>\n </div>\n <div class="chat-body chatroom-body"><span class="spinner centered"/></div>\n</div>\n'; ' </div>\n <p class="chatroom-topic"><p/>\n </div>\n <div class="chat-body chatroom-body"><span class="spinner centered"/></div>\n</div>\n';
@ -269,9 +279,14 @@ return __p
this["templates"]["controlbox"] = function(obj) { this["templates"]["controlbox"] = function(obj) {
obj || (obj = {}); obj || (obj = {});
var __t, __p = '', __e = _.escape; var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
with (obj) { with (obj) {
__p += '<div class="flyout box-flyout">\n <div class="dragresize dragresize-top"></div>\n <div class="dragresize dragresize-topleft"></div>\n <div class="dragresize dragresize-left"></div>\n <div class="chat-head controlbox-head">\n <ul id="controlbox-tabs"></ul>\n <a class="chatbox-btn close-chatbox-button icon-close"></a>\n </div>\n <div class="controlbox-panes"></div>\n</div>\n'; __p += '<div class="flyout box-flyout">\n <div class="dragresize dragresize-top"></div>\n <div class="dragresize dragresize-topleft"></div>\n <div class="dragresize dragresize-left"></div>\n <div class="chat-head controlbox-head">\n <ul id="controlbox-tabs"></ul>\n ';
if (!sticky_controlbox) { ;
__p += '\n <a class="chatbox-btn close-chatbox-button icon-close"></a>\n ';
} ;
__p += '\n </div>\n <div class="controlbox-panes"></div>\n</div>\n';
} }
return __p return __p

View File

@ -12,11 +12,11 @@
<link type="text/css" rel="stylesheet" media="screen" href="components/bootstrap/dist/css/bootstrap.min.css" /> <link type="text/css" rel="stylesheet" media="screen" href="components/bootstrap/dist/css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" media="screen" href="components/fontawesome/css/font-awesome.min.css" /> <link type="text/css" rel="stylesheet" media="screen" href="components/fontawesome/css/font-awesome.min.css" />
<link type="text/css" rel="stylesheet" media="screen" href="css/theme.css" /> <link type="text/css" rel="stylesheet" media="screen" href="css/theme.css" />
<link type="text/css" rel="stylesheet" media="screen" href="css/converse.min.css" /> <link type="text/css" rel="stylesheet" media="screen" href="css/converse.css" />
<script type="text/javascript" src="analytics.js"></script> <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> <noscript><p><img src="//stats.opkode.com/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>
<![if gte IE 9]> <![if gte IE 9]>
<script src="dist/converse.js"></script> <script src="dist/converse-mobile.js"></script>
<![endif]> <![endif]>
</head> </head>

15
src/build-mobile.js Normal file
View File

@ -0,0 +1,15 @@
({
baseUrl: "../",
name: "components/almond/almond.js",
out: "../dist/converse-mobile.min.js",
mainConfigFile: '../converse.js',
excludeShallow: [
"converse-minimize",
"converse-dragresize"
],
include: ['converse'],
insertRequire: ['converse'],
wrap: {
endFile: ["wrapper-mobile.js"]
},
})

2
src/wrapper-mobile.js Normal file
View File

@ -0,0 +1,2 @@
define('converse-minimize', [], function () { return; });
define('converse-dragresize', [], function () { return; });