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
bd00fabe
Commit
bd00fabe
authored
Jan 20, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation on creating custom builds.
parent
d6b5ed5e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
8 deletions
+38
-8
docs/source/builds.rst
docs/source/builds.rst
+34
-4
docs/source/configuration.rst
docs/source/configuration.rst
+1
-1
src/converse.js
src/converse.js
+3
-3
No files found.
docs/source/builds.rst
View file @
bd00fabe
...
...
@@ -28,14 +28,13 @@ to define modules and their dependencies.
Dependencies can then be loaded on-the-fly with `require.js <http://requirejs.org>`_.
This is very useful during development, but when it comes to
deployement
, it's usually desired
to create a single, minified distribution build.
deployement
you'll usually want
to create a single, minified distribution build.
For this, the `r.js optimizer <http://requirejs.org/docs/optimization.html>`_
is used together with `almond.js <https://github.com/requirejs/almond>`_, which
is a minimal AMD API implementation that replaces require.js in builds (in
order to keep the build smaller).
is a smaller and minimal AMD API implementation that replaces require.js in builds.
To create the distribution build, simply run::
To create the distribution build
s
, simply run::
make dist
...
...
@@ -61,6 +60,37 @@ The Javascript build files are contained in the ``./dist`` directory:
.. _`minification`:
Creating custom builds
----------------------
One reason you might want to create your own builds, is because you want to
remove some of the core plugins of converse.js, or perhaps you want to include
your own.
To add or remove plugins from the build, you need to modify the
``src/converse.js`` file.
You'll find a section marked ``/* START: Removable components`` and
``/* END: Removable components */``.
In this section is listed all the converse.js plugins that will make up a
build.
You could for example decide to disable the ControlBox altogether by removing
the ``converse-controlbox`` plugin.
After doing so, you need to run ``make dist`` again in the root or your
converse.js repository, in order to generate the new build.
Be aware that some plugins might have dependencies on other plugins, so if you
remove a certain plugin but other included plugins still depend on it, then it
will still be included in your build.
To see which other plugins a particular plugin depends on, open it up in your
text editor and look at the list specified as the second parameter to the
``define`` call, near the top of the file. This list specifies the dependencies
of that plugin.
Minifying the CSS
-----------------
...
...
docs/source/configuration.rst
View file @
bd00fabe
...
...
@@ -995,7 +995,7 @@ This allows plugins to have "soft" dependencies which aren't declared as
as dependencies.
synchronize_availability
--------------------
--------------------
----
* Default: ``true``
...
...
src/converse.js
View file @
bd00fabe
...
...
@@ -10,9 +10,9 @@ if (typeof define !== 'undefined') {
"
converse-api
"
,
/* 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.
*/
"
locales
"
,
// Translations for converse.js. This line can be removed
// to remove *all* translations, or you can modify the
// file src/locales.js to include only those
...
...
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