Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
11c1b016
Commit
11c1b016
authored
Mar 14, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add converse-headless.js dist file and recipes
updates #1352
parent
d919e812
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
71092 additions
and
190 deletions
+71092
-190
Makefile
Makefile
+11
-2
dist/converse.js
dist/converse.js
+164
-154
src/converse-muc-views.js
src/converse-muc-views.js
+5
-0
src/headless/converse-core.js
src/headless/converse-core.js
+24
-24
src/headless/converse-muc.js
src/headless/converse-muc.js
+10
-8
src/headless/dist/converse-headless.js
src/headless/dist/converse-headless.js
+70876
-0
src/headless/package.json
src/headless/package.json
+2
-2
No files found.
Makefile
View file @
11c1b016
...
@@ -196,6 +196,8 @@ logo/conversejs-filled%.png:: logo/conversejs-filled.svg
...
@@ -196,6 +196,8 @@ logo/conversejs-filled%.png:: logo/conversejs-filled.svg
BUILDS
=
dist/converse.js
\
BUILDS
=
dist/converse.js
\
dist/converse.min.js
\
dist/converse.min.js
\
dist/converse-headless.js
\
dist/converse-headless.js
\
src/headless/dist/converse-headless.js
\
src/headless/dist/converse-headless.min.js
\
dist/converse-headless.min.js
\
dist/converse-headless.min.js
\
dist/converse-no-dependencies.min.js
\
dist/converse-no-dependencies.min.js
\
dist/converse-no-dependencies.js
\
dist/converse-no-dependencies.js
\
...
@@ -207,8 +209,12 @@ dist/converse.min.js: src webpack.config.js stamp-npm @converse/headless
...
@@ -207,8 +209,12 @@ dist/converse.min.js: src webpack.config.js stamp-npm @converse/headless
$(NPX)
webpack
--mode
=
production
$(NPX)
webpack
--mode
=
production
dist/converse-headless.js
:
src webpack.config.js stamp-npm @converse/headless
dist/converse-headless.js
:
src webpack.config.js stamp-npm @converse/headless
$(NPX)
webpack
--mode
=
development
--type
=
headless
$(NPX)
webpack
--mode
=
development
--type
=
headless
src/headless/dist/converse-headless.js
:
dist/converse-headless.js
cp
dist/converse-headless.js src/headless/dist/converse-headless.js
dist/converse-headless.min.js
:
src webpack.config.js stamp-npm @converse/headless
dist/converse-headless.min.js
:
src webpack.config.js stamp-npm @converse/headless
$(NPX)
webpack
--mode
=
production
--type
=
headless
$(NPX)
webpack
--mode
=
production
--type
=
headless
src/headless/dist/converse-headless.min.js
:
dist/converse-headless.min.js
cp
dist/converse-headless.min.js src/headless/dist/converse-headless.min.js
dist/converse-no-dependencies.js
:
src webpack.config.js stamp-npm @converse/headless
dist/converse-no-dependencies.js
:
src webpack.config.js stamp-npm @converse/headless
$(NPX)
webpack
--mode
=
development
--type
=
nodeps
$(NPX)
webpack
--mode
=
development
--type
=
nodeps
dist/converse-no-dependencies.min.js
:
src webpack.config.js stamp-npm @converse/headless
dist/converse-no-dependencies.min.js
:
src webpack.config.js stamp-npm @converse/headless
...
@@ -229,11 +235,14 @@ build:: dev css $(BUILDS)
...
@@ -229,11 +235,14 @@ build:: dev css $(BUILDS)
.PHONY
:
eslint
.PHONY
:
eslint
eslint
:
stamp-npm
eslint
:
stamp-npm
$(ESLINT)
src/
$(ESLINT)
src/
*
.js
$(ESLINT)
src/utils/
*
.js
$(ESLINT)
src/headless/
*
.js
$(ESLINT)
src/headless/utils/
*
.js
$(ESLINT)
spec/
$(ESLINT)
spec/
.PHONY
:
check
.PHONY
:
check
check
:
dist/converse.js eslint
check
:
eslint dist/converse.js
LOG_CR_VERBOSITY
=
INFO
$(CHROMIUM)
--disable-gpu
--no-sandbox
http://localhost:
$(HTTPSERVE_PORT)
/tests/index.html
LOG_CR_VERBOSITY
=
INFO
$(CHROMIUM)
--disable-gpu
--no-sandbox
http://localhost:
$(HTTPSERVE_PORT)
/tests/index.html
########################################################################
########################################################################
...
...
dist/converse.js
View file @
11c1b016
This diff is collapsed.
Click to expand it.
src/converse-muc-views.js
View file @
11c1b016
...
@@ -3,8 +3,13 @@
...
@@ -3,8 +3,13 @@
//
//
// Copyright (c) 2013-2019, the Converse.js developers
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
// Licensed under the Mozilla Public License (MPLv2)
//
// XEP-0045 Multi-User Chat Views
import
"
converse-modal
"
;
import
"
converse-modal
"
;
import
"
backbone.overview/backbone.orderedlistview
"
;
import
"
backbone.overview/backbone.overview
"
;
import
"
backbone.vdomview
"
;
import
Awesomplete
from
"
awesomplete
"
;
import
Awesomplete
from
"
awesomplete
"
;
import
_FormData
from
"
formdata-polyfill
"
;
import
_FormData
from
"
formdata-polyfill
"
;
import
converse
from
"
@converse/headless/converse-core
"
;
import
converse
from
"
@converse/headless/converse-core
"
;
...
...
src/headless/converse-core.js
View file @
11c1b016
...
@@ -439,27 +439,30 @@ function unregisterGlobalEventHandlers () {
...
@@ -439,27 +439,30 @@ function unregisterGlobalEventHandlers () {
}
}
function
cleanup
()
{
function
cleanup
()
{
// Looks like _converse.initialized was called again without logging
// Looks like _converse.initialized was called again without logging
// out or disconnecting in the previous session.
// out or disconnecting in the previous session.
// This happens in tests. We therefore first clean up.
// This happens in tests. We therefore first clean up.
Backbone
.
history
.
stop
();
Backbone
.
history
.
stop
();
_converse
.
chatboxviews
.
closeAllChatBoxes
();
if
(
_converse
.
chatboxviews
)
{
unregisterGlobalEventHandlers
();
_converse
.
chatboxviews
.
closeAllChatBoxes
();
window
.
localStorage
.
clear
();
}
window
.
sessionStorage
.
clear
();
unregisterGlobalEventHandlers
();
if
(
_converse
.
bookmarks
)
{
window
.
localStorage
.
clear
();
_converse
.
bookmarks
.
reset
();
window
.
sessionStorage
.
clear
();
}
if
(
_converse
.
bookmarks
)
{
delete
_converse
.
controlboxtoggle
;
_converse
.
bookmarks
.
reset
();
delete
_converse
.
chatboxviews
;
}
delete
_converse
.
controlboxtoggle
;
_converse
.
connection
.
reset
();
if
(
_converse
.
chatboxviews
)
{
_converse
.
tearDown
();
delete
_converse
.
chatboxviews
;
_converse
.
stopListening
();
}
_converse
.
off
();
_converse
.
connection
.
reset
();
_converse
.
tearDown
();
delete
_converse
.
config
;
_converse
.
stopListening
();
initClientConfig
();
_converse
.
off
();
delete
_converse
.
config
;
initClientConfig
();
}
}
...
@@ -1195,9 +1198,6 @@ _converse.initialize = async function (settings, callback) {
...
@@ -1195,9 +1198,6 @@ _converse.initialize = async function (settings, callback) {
};
};
this
.
tearDown
=
function
()
{
this
.
tearDown
=
function
()
{
/* Remove those views which are only allowed with a valid
* connection.
*/
_converse
.
emit
(
'
beforeTearDown
'
);
_converse
.
emit
(
'
beforeTearDown
'
);
if
(
!
_
.
isUndefined
(
_converse
.
session
))
{
if
(
!
_
.
isUndefined
(
_converse
.
session
))
{
_converse
.
session
.
destroy
();
_converse
.
session
.
destroy
();
...
...
src/headless/converse-muc.js
View file @
11c1b016
...
@@ -3,13 +3,12 @@
...
@@ -3,13 +3,12 @@
//
//
// Copyright (c) 2013-2019, the Converse.js developers
// Copyright (c) 2013-2019, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
// Licensed under the Mozilla Public License (MPLv2)
//
// XEP-0045 Multi-User Chat
import
"
./converse-disco
"
;
import
"
./converse-disco
"
;
import
"
./utils/emoji
"
;
import
"
./utils/emoji
"
;
import
"
./utils/muc
"
;
import
"
./utils/muc
"
;
import
"
backbone.overview/backbone.orderedlistview
"
;
import
"
backbone.overview/backbone.overview
"
;
import
"
backbone.vdomview
"
;
import
converse
from
"
./converse-core
"
;
import
converse
from
"
./converse-core
"
;
import
u
from
"
./utils/form
"
;
import
u
from
"
./utils/form
"
;
...
@@ -1314,11 +1313,15 @@ converse.plugins.add('converse-muc', {
...
@@ -1314,11 +1313,15 @@ converse.plugins.add('converse-muc', {
}
}
}
}
if
(
result
===
true
)
{
if
(
result
===
true
)
{
const
chatroom
=
_converse
.
openChatRoom
(
const
chatroom
=
_converse
.
openChatRoom
(
room_jid
,
{
'
password
'
:
x_el
.
getAttribute
(
'
password
'
)
});
room_jid
,
{
'
password
'
:
x_el
.
getAttribute
(
'
password
'
)
});
if
(
chatroom
.
get
(
'
connection_status
'
)
===
converse
.
ROOMSTATUS
.
DISCONNECTED
)
{
if
(
chatroom
.
get
(
'
connection_status
'
)
===
converse
.
ROOMSTATUS
.
DISCONNECTED
)
{
_converse
.
chatboxviews
.
get
(
room_jid
).
join
();
// XXX: Leaky abstraction from views here
if
(
_converse
.
chatboxviews
)
{
_converse
.
chatboxviews
.
get
(
room_jid
).
join
();
}
else
{
_converse
.
chatboxes
.
get
(
room_jid
).
join
();
}
}
}
}
}
};
};
...
@@ -1445,8 +1448,7 @@ converse.plugins.add('converse-muc', {
...
@@ -1445,8 +1448,7 @@ converse.plugins.add('converse-muc', {
* Creates a new MUC chatroom (aka groupchat)
* Creates a new MUC chatroom (aka groupchat)
*
*
* Similar to {@link _converse.api.rooms.open}, but creates
* Similar to {@link _converse.api.rooms.open}, but creates
* the chatroom in the background (i.e. doesn't cause a
* the chatroom in the background (i.e. doesn't cause a view to open).
* view to open).
*
*
* @method _converse.api.rooms.create
* @method _converse.api.rooms.create
* @param {(string[]|string)} jid|jids The JID or array of
* @param {(string[]|string)} jid|jids The JID or array of
...
...
src/headless/dist/converse-headless.js
0 → 100644
View file @
11c1b016
This diff is collapsed.
Click to expand it.
src/headless/package.json
View file @
11c1b016
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
"version"
:
"4.1.2"
,
"version"
:
"4.1.2"
,
"description"
:
"Converse.js Headless build"
,
"description"
:
"Converse.js Headless build"
,
"author"
:
"cmrd Senya <senya@riseup.net>"
,
"author"
:
"cmrd Senya <senya@riseup.net>"
,
"homepage"
:
"https://
github.com/conversejs/converse.js
"
,
"homepage"
:
"https://
conversejs.org
"
,
"license"
:
"MPL-2.0"
,
"license"
:
"MPL-2.0"
,
"main"
:
"
converse-core
.js"
,
"main"
:
"
dist/converse-headless
.js"
,
"files"
:
[
"files"
:
[
"**/*.js"
,
"**/*.js"
,
"templates/*"
"templates/*"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment