librelist archives

« back to archive

ConverseJS without the AMD Modules

ConverseJS without the AMD Modules

From:
Gauri Padbidri
Date:
2015-05-04 @ 20:21
Hi JC,

 

I want to integrate ConverseJS with the NodeBB based website.To give you a
background, NodeBB
<https://media.readthedocs.org/pdf/nodebb/latest/nodebb.pdf>  works on AMD
Module, where it uses REQUIRE / UNDERSCORE JS.Somehow including the
converse.js from  the BUILDS folder into the NodeBB Site, conflicts with
NodeBB.Hence, we included ALL SCRIPT files listed as is from the
non-amd.html but even that seems to not work as expected, meaning we see
broken Chatrooms functionality, etc. Can you help me in this issue, where I
can integrate Converse in the NodeBB site, without losing the functionality.

 

For now, we have removed the following sections from all the referred files
: 

if (typeof define === 'function' && define.amd) {} and directly assigned
them to Browser GLOBAL variables.

 

But, this seems to break the functionality. Please suggest me a reliable and
optimal way to achieve the same. Thanks !

 

Best Regards,

Gauri Padbidri

Re: [conversejs] ConverseJS without the AMD Modules

From:
Jc Brand
Date:
2015-05-05 @ 08:36
My answer to you would be the same as the one I gave here:
https://github.com/jcbrand/converse.js/issues/384#issuecomment-98763025

On Tue, May 05, 2015 at 01:51:53AM +0530, Gauri Padbidri wrote:
>    Hi JC,
> 
>    I want to integrate ConverseJS with the NodeBB based website…To give you a
>    background, [1]NodeBB works on AMD Module, where it uses REQUIRE /
>    UNDERSCORE JS…Somehow including the converse.js from  the BUILDS folder
>    into the NodeBB Site, conflicts with NodeBB…Hence, we included ALL SCRIPT
>    files listed as is from the non-amd.html but even that seems to not work
>    as expected, meaning we see broken Chatrooms functionality, etc. Can you
>    help me in this issue, where I can integrate Converse in the NodeBB site,
>    without losing the functionality…
> 
>    For now, we have removed the following sections from all the referred
>    files :
> 
>    if (typeof define === 'function' && define.amd) {} and directly assigned
>    them to Browser GLOBAL variables.
> 
>    But, this seems to break the functionality. Please suggest me a reliable
>    and optimal way to achieve the same. Thanks !
> 
>    Best Regards,
>    Gauri Padbidri
> 
> References
> 
>    Visible links
>    1. https://media.readthedocs.org/pdf/nodebb/latest/nodebb.pdf