main.js 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. require.config({
  2. baseUrl: '.',
  3. paths: {
  4. "backbone": "components/backbone/backbone",
  5. "backbone.browserStorage": "components/backbone.browserStorage/backbone.browserStorage",
  6. "backbone.overview": "components/backbone.overview/backbone.overview",
  7. "bootstrap": "components/bootstrap/dist/js/bootstrap", // XXX: Only required for https://conversejs.org website
  8. "bootstrapJS": "components/bootstrapJS/index", // XXX: Only required for https://conversejs.org website
  9. "converse-dependencies": "src/deps-website",
  10. "converse-templates": "src/templates",
  11. "eventemitter": "components/otr/build/dep/eventemitter",
  12. "jquery": "components/jquery/dist/jquery",
  13. "jquery-private": "src/jquery-private",
  14. "jquery.browser": "components/jquery.browser/index",
  15. "jquery.easing": "components/jquery-easing-original/index", // XXX: Only required for https://conversejs.org website
  16. "moment": "components/momentjs/moment",
  17. "strophe": "components/strophe/strophe",
  18. "strophe.disco": "components/strophejs-plugins/disco/strophe.disco",
  19. "strophe.muc": "components/strophe.muc/index",
  20. "strophe.roster": "src/strophe.roster",
  21. "strophe.vcard": "components/strophejs-plugins/vcard/strophe.vcard",
  22. "text": 'components/requirejs-text/text',
  23. "tpl": 'components/requirejs-tpl-jcbrand/tpl',
  24. "typeahead": "components/typeahead.js/index",
  25. "underscore": "components/underscore/underscore",
  26. "utils": "src/utils",
  27. // Off-the-record-encryption
  28. "bigint": "src/bigint",
  29. "crypto": "src/crypto",
  30. "crypto.aes": "components/otr/vendor/cryptojs/aes",
  31. "crypto.cipher-core": "components/otr/vendor/cryptojs/cipher-core",
  32. "crypto.core": "components/otr/vendor/cryptojs/core",
  33. "crypto.enc-base64": "components/otr/vendor/cryptojs/enc-base64",
  34. "crypto.evpkdf": "components/crypto-js-evanvosberg/src/evpkdf",
  35. "crypto.hmac": "components/otr/vendor/cryptojs/hmac",
  36. "crypto.md5": "components/crypto-js-evanvosberg/src/md5",
  37. "crypto.mode-ctr": "components/otr/vendor/cryptojs/mode-ctr",
  38. "crypto.pad-nopadding": "components/otr/vendor/cryptojs/pad-nopadding",
  39. "crypto.sha1": "components/otr/vendor/cryptojs/sha1",
  40. "crypto.sha256": "components/otr/vendor/cryptojs/sha256",
  41. "salsa20": "components/otr/build/dep/salsa20",
  42. "otr": "src/otr",
  43. // Locales paths
  44. "locales": "locale/locales",
  45. "jed": "components/jed/jed",
  46. "af": "locale/af/LC_MESSAGES/af",
  47. "de": "locale/de/LC_MESSAGES/de",
  48. "en": "locale/en/LC_MESSAGES/en",
  49. "es": "locale/es/LC_MESSAGES/es",
  50. "fr": "locale/fr/LC_MESSAGES/fr",
  51. "he": "locale/he/LC_MESSAGES/he",
  52. "hu": "locale/hu/LC_MESSAGES/hu",
  53. "id": "locale/id/LC_MESSAGES/id",
  54. "it": "locale/it/LC_MESSAGES/it",
  55. "ja": "locale/ja/LC_MESSAGES/ja",
  56. "nl": "locale/nl/LC_MESSAGES/nl",
  57. "pt_BR": "locale/pt_BR/LC_MESSAGES/pt_BR",
  58. "ru": "locale/ru/LC_MESSAGES/ru",
  59. "zh": "locale/zh/LC_MESSAGES/zh",
  60. // Templates
  61. "action": "src/templates/action",
  62. "add_contact_dropdown": "src/templates/add_contact_dropdown",
  63. "add_contact_form": "src/templates/add_contact_form",
  64. "change_status_message": "src/templates/change_status_message",
  65. "chat_status": "src/templates/chat_status",
  66. "chatarea": "src/templates/chatarea",
  67. "chatbox": "src/templates/chatbox",
  68. "chatroom": "src/templates/chatroom",
  69. "chatroom_password_form": "src/templates/chatroom_password_form",
  70. "chatroom_sidebar": "src/templates/chatroom_sidebar",
  71. "chatrooms_tab": "src/templates/chatrooms_tab",
  72. "chats_panel": "src/templates/chats_panel",
  73. "choose_status": "src/templates/choose_status",
  74. "contacts_panel": "src/templates/contacts_panel",
  75. "contacts_tab": "src/templates/contacts_tab",
  76. "controlbox": "src/templates/controlbox",
  77. "controlbox_toggle": "src/templates/controlbox_toggle",
  78. "field": "src/templates/field",
  79. "form_checkbox": "src/templates/form_checkbox",
  80. "form_input": "src/templates/form_input",
  81. "form_select": "src/templates/form_select",
  82. "group_header": "src/templates/group_header",
  83. "info": "src/templates/info",
  84. "login_panel": "src/templates/login_panel",
  85. "login_tab": "src/templates/login_tab",
  86. "message": "src/templates/message",
  87. "new_day": "src/templates/new_day",
  88. "occupant": "src/templates/occupant",
  89. "pending_contact": "src/templates/pending_contact",
  90. "pending_contacts": "src/templates/pending_contacts",
  91. "requesting_contact": "src/templates/requesting_contact",
  92. "requesting_contacts": "src/templates/requesting_contacts",
  93. "register_panel": "src/templates/register_panel",
  94. "register_tab": "src/templates/register_tab",
  95. "room_description": "src/templates/room_description",
  96. "room_item": "src/templates/room_item",
  97. "room_panel": "src/templates/room_panel",
  98. "roster": "src/templates/roster",
  99. "roster_item": "src/templates/roster_item",
  100. "search_contact": "src/templates/search_contact",
  101. "select_option": "src/templates/select_option",
  102. "status_option": "src/templates/status_option",
  103. "toggle_chats": "src/templates/toggle_chats",
  104. "toolbar": "src/templates/toolbar",
  105. "trimmed_chat": "src/templates/trimmed_chat",
  106. "form_textarea": "src/templates/form_textarea"
  107. },
  108. map: {
  109. // '*' means all modules will get 'jquery-private'
  110. // for their 'jquery' dependency.
  111. '*': { 'jquery': 'jquery-private' },
  112. // 'jquery-private' wants the real jQuery module
  113. // though. If this line was not here, there would
  114. // be an unresolvable cyclic dependency.
  115. 'jquery-private': { 'jquery': 'jquery' }
  116. },
  117. tpl: {
  118. // Configuration for requirejs-tpl
  119. // Use Mustache style syntax for variable interpolation
  120. templateSettings: {
  121. evaluate : /\{\[([\s\S]+?)\]\}/g,
  122. interpolate : /\{\{([\s\S]+?)\}\}/g
  123. }
  124. },
  125. // define module dependencies for modules not using define
  126. shim: {
  127. 'underscore': { exports: '_' },
  128. 'crypto.aes': { deps: ['crypto.cipher-core'] },
  129. 'crypto.cipher-core': { deps: ['crypto.enc-base64', 'crypto.evpkdf'] },
  130. 'crypto.enc-base64': { deps: ['crypto.core'] },
  131. 'crypto.evpkdf': { deps: ['crypto.md5'] },
  132. 'crypto.hmac': { deps: ['crypto.core'] },
  133. 'crypto.md5': { deps: ['crypto.core'] },
  134. 'crypto.mode-ctr': { deps: ['crypto.cipher-core'] },
  135. 'crypto.pad-nopadding': { deps: ['crypto.cipher-core'] },
  136. 'crypto.sha1': { deps: ['crypto.core'] },
  137. 'crypto.sha256': { deps: ['crypto.core'] },
  138. 'bigint': { deps: ['crypto'] },
  139. 'strophe': { exports: 'Strophe' },
  140. 'strophe.disco': { deps: ['strophe'] },
  141. 'strophe.muc': { deps: ['strophe'] },
  142. 'strophe.register': { deps: ['strophe'] },
  143. 'strophe.roster': { deps: ['strophe'] },
  144. 'strophe.vcard': { deps: ['strophe'] }
  145. }
  146. });
  147. require(["converse"], function(converse) {
  148. window.converse = converse;
  149. });