dependencies.rst 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. .. raw:: html
  2. <div id="banner"><a href="https://github.com/jcbrand/converse.js/blob/master/docs/source/theming.rst">Edit me on GitHub</a></div>
  3. ============
  4. Dependencies
  5. ============
  6. Installing the 3rd party dependencies
  7. =====================================
  8. .. note::
  9. Windows environment: We recommend installing the required tools using `Chocolatey <https://chocolatey.org/>`_
  10. You will need Node.js (nodejs.install), Git (git.install) and optionally to build using Makefile, GNU Make (make)
  11. If you have trouble setting up a development environment on Windows,
  12. please read `this post <http://librelist.com/browser//conversejs/2014/11/5/openfire-converse-and-visual-studio-questions/#b28387e7f8f126693b11598a8acbe810>`_
  13. in the mailing list.:
  14. We use development tools which depend on Node.js and npm (the Node package manager).
  15. If you don't have Node.js installed, you can download and install the latest
  16. version `here <https://nodejs.org/download>`_.
  17. Alternatively you can `use your operating system's package manager to install
  18. Node.js <https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions>`_.
  19. Also make sure you have ``Git`` installed. `See here <http://git-scm.com/book/en/Getting-Started-Installing-Git>`_.
  20. Now use ``git`` to check out the Converse repository:
  21. ::
  22. git clone git@github.com:conversejs/converse.js.git
  23. Now go into the repository checkout and run ``make dev`` in order to set up the
  24. development environment.
  25. ::
  26. cd converse.js
  27. make dev
  28. On Windows you need to specify Makefile.win to be used by running:
  29. ::
  30. make -f Makefile.win dev
  31. Alternatively, if you don't have GNU Make (necessary for the ``make`` command),
  32. you can use NPM directly:
  33. ::
  34. npm install
  35. This will install the Node.js development tools and Converse's dependencies.
  36. The front-end dependencies are those JavaScript files on which
  37. Converse directly depends and which will be loaded in the browser as part of
  38. the bundle in ``dist/converse.js`` (or ``dist/converse.min.js``).
  39. To see the 3rd party dependencies (not just the front-end dependencies, but
  40. also ones necessary for development tasks like making builds), take a look at
  41. the list under the ``devDependencies`` in `package.json <https://github.com/jcbrand/converse.js/blob/master/package.json>`_.
  42. .. note::
  43. After running ```make dev```, you should now have a new *node_modules* directory
  44. which contains all the external dependencies of Converse.
  45. If this directory does NOT exist, something must have gone wrong.
  46. Double-check the output of ```make dev``` to see if there are any errors
  47. listed. For support, you can ask in our chatroom: `dicuss@conference.conversejs.org <xmpp:discuss@conference.conversejs.org>`_.
  48. If you don't have an XMPP client installed, follow this link to
  49. `conversejs.org <https://conversejs.org/fullscreen#converse/room?jid=discuss@conference.conversejs.org>`_
  50. where you can log in and be taken directly to the chatroom.
  51. Brief description of Converse's dependencies
  52. ===============================================
  53. Converse relies on the following dependencies:
  54. * `moment.js <http://momentjs.com/>`_ provides a better API for handling dates and times.
  55. * `Strophe.js <http://strophe.im/>`_ maintains the XMPP session, is used to
  56. build XMPP stanzas, to send them, and to register handlers for received stanzas.
  57. * `lodash <https://lodash.com/>`_ provides very useful utility functions.
  58. * `Backbone <http://backbonejs.org/>`_ is used to model the data as Models and
  59. Collections and to create Views that render the UI.
  60. * `backbone.overview <http://github.com/jcbrand/backbone.overview>`_ provides
  61. ``Backbone.Overview``, which is to Views as Backbone Collection is to Models.
  62. It also provides the ``Backbone.OrderedListView`` which is used to show
  63. alphabetically sorted lists, such as your contacts roster.
  64. * `backbone.vdomview <http://github.com/jcbrand/backbone.vdomview>`_ provides
  65. ``Backbone.VDOMView`` that uses the `Snabbdom <https://github.com/snabbdom/snabbdom>`_
  66. virtual DOM for rendering DOM elements.
  67. * `pluggable.js <https://github.com/jcbrand/pluggable.js>`_ provides the plugin
  68. architecture for Converse. It registers and initializes plugins and
  69. allows existing attributes, functions and objects on Converse to be
  70. overridden inside plugins.
  71. Libsignal
  72. ---------
  73. Optionally, if you want OMEMO encryption, you need to load `libsignal
  74. <https://github.com/signalapp/libsignal-protocol-javascript>`_ separately in
  75. your page.
  76. For example::
  77. <script src="3rdparty/libsignal-protocol-javascript/dist/libsignal-protocol.js"></script>
  78. The reason libsignal needs to be loaded separately is because it's released
  79. under the `GPLv3 <https://github.com/signalapp/libsignal-protocol-javascript/blob/master/LICENSE>`_
  80. which requires all other dependent JavaScript code to also be open sourced under the same
  81. license. You might not be willing to adhere to those terms, which is why you
  82. need to decide for yourself whether you're going to load libsignal or not.