From f1bf5a96545517de174c3e73c2035c76405da629 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Wed, 8 Mar 2017 11:15:19 +0000 Subject: [PATCH] Fixes #807 - Document `optional_plugin_dependencies` - Also make `converse-headlines` an optional dependency of `converse-dragresize` --- docs/CHANGES.md | 4 + docs/source/configuration.rst | 1 + docs/source/plugin_development.rst | 123 +++++++++++++++++++++++++++-- src/converse-dragresize.js | 13 +++ src/converse-muc.js | 8 +- 5 files changed, 140 insertions(+), 9 deletions(-) diff --git a/docs/CHANGES.md b/docs/CHANGES.md index f533f73b1..74db45f3b 100755 --- a/docs/CHANGES.md +++ b/docs/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## 3.0.1 (Unreleased) + +- #807 Error: Plugin "converse-dragresize" tried to override HeadlinesBoxView but it's not found. [jcbrand] + ## 3.0.0 (2017-03-05) - **Breaking changes**: diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst index 0e57cd007..71beeb91d 100644 --- a/docs/source/configuration.rst +++ b/docs/source/configuration.rst @@ -1035,6 +1035,7 @@ devices when the intent is to use converse.js as a web app. In this case it doesn't make sense to close the control box, as there's often then nothing "behind" it that's relevant to the user. +.. _`strict_plugin_dependencies`: strict_plugin_dependencies -------------------------- diff --git a/docs/source/plugin_development.rst b/docs/source/plugin_development.rst index d330a0727..1d1f82f1c 100644 --- a/docs/source/plugin_development.rst +++ b/docs/source/plugin_development.rst @@ -4,8 +4,8 @@ .. _`writing-a-plugin`: -Writing a converse.js plugin -============================ +Writing a plugin +================ .. contents:: Table of Contents :depth: 2 @@ -59,15 +59,75 @@ The inner ``_converse`` object is made private in order to safely hide and encapsulate sensitive information and methods which should not be exposed to any 3rd-party scripts that might be running in the same page. -An example plugin +Loading a plugin ----------------- -In the example below, you can see how to access 3rd party libraries (such +Converse.js uses the UMD (Universal Modules Definition) as its module syntax. +This makes modules loadable via `require.js`, `webpack` or other module +loaders, but also includable as old-school `