From 3fea9a09a8e090c62b321c6e85e578a91580c6ea Mon Sep 17 00:00:00 2001 From: JC Brand Date: Tue, 5 Aug 2014 16:11:20 +0200 Subject: [PATCH] Add a new build without OTR to be used on IE. --- Gruntfile.js | 3 ++- index.html | 10 ++++++-- src/build-no-otr.js | 4 +-- src/build-website-no-otr.js | 49 +++++++++++++++++++++++++++++++++++++ src/deps-website-no-otr.js | 19 ++++++++++++++ 5 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 src/build-website-no-otr.js create mode 100644 src/deps-website-no-otr.js diff --git a/Gruntfile.js b/Gruntfile.js index 885949797..93f57858d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -101,7 +101,8 @@ module.exports = function(grunt) { exec('./node_modules/requirejs/bin/r.js -o src/build.js && ' + './node_modules/requirejs/bin/r.js -o src/build-no-locales-no-otr.js && ' + './node_modules/requirejs/bin/r.js -o src/build-no-otr.js &&' + - './node_modules/requirejs/bin/r.js -o src/build-website.js', callback); + './node_modules/requirejs/bin/r.js -o src/build-website.js &&' + + './node_modules/requirejs/bin/r.js -o src/build-website-no-otr.js', callback); }); grunt.registerTask('minify', 'Create a new release', ['cssmin', 'jsmin']); diff --git a/index.html b/index.html index 16873be3e..7fe9c3d7e 100644 --- a/index.html +++ b/index.html @@ -12,8 +12,14 @@ - - + + + + + + + + diff --git a/src/build-no-otr.js b/src/build-no-otr.js index 9fda8a6da..46ac70a4c 100644 --- a/src/build-no-otr.js +++ b/src/build-no-otr.js @@ -21,13 +21,14 @@ "fr": "locale/fr/LC_MESSAGES/fr", "he": "locale/he/LC_MESSAGES/he", "hu": "locale/hu/LC_MESSAGES/hu", - "it": "locale/it/LC_MESSAGES/it", "id": "locale/id/LC_MESSAGES/id", + "it": "locale/it/LC_MESSAGES/it", "ja": "locale/ja/LC_MESSAGES/ja", "nl": "locale/nl/LC_MESSAGES/nl", "pt_BR": "locale/pt_BR/LC_MESSAGES/pt_BR", "ru": "locale/ru/LC_MESSAGES/ru", "zh": "locale/zh/LC_MESSAGES/zh", + "jquery.browser": "components/jquery.browser/dist/jquery.browser", "underscore": "components/underscore/underscore", "backbone": "components/backbone/backbone", "backbone.browserStorage": "components/backbone.browserStorage/backbone.browserStorage", @@ -38,7 +39,6 @@ "strophe.vcard": "components/strophe.vcard/index", "strophe.disco": "components/strophe.disco/index", "converse-dependencies": "src/deps-no-otr", - "jquery.browser": "components/jquery.browser/dist/jquery.browser", "moment":"components/momentjs/moment", "converse-templates":"src/templates", "tpl": "components/requirejs-tpl-jcbrand/tpl", diff --git a/src/build-website-no-otr.js b/src/build-website-no-otr.js new file mode 100644 index 000000000..566e2b093 --- /dev/null +++ b/src/build-website-no-otr.js @@ -0,0 +1,49 @@ +({ + baseUrl: "../", + name: "components/almond/almond.js", + out: "../builds/converse.website-no-otr.min.js", + include: ['main'], + tpl: { + // Use Mustache style syntax for variable interpolation + templateSettings: { + evaluate : /\{\[([\s\S]+?)\]\}/g, + interpolate : /\{\{([\s\S]+?)\}\}/g + } + }, + paths: { + "jquery": "components/jquery/dist/jquery", + "jed": "components/jed/jed", + "locales": "locale/locales", + "af": "locale/af/LC_MESSAGES/af", + "de": "locale/de/LC_MESSAGES/de", + "en": "locale/en/LC_MESSAGES/en", + "es": "locale/es/LC_MESSAGES/es", + "fr": "locale/fr/LC_MESSAGES/fr", + "he": "locale/he/LC_MESSAGES/he", + "hu": "locale/hu/LC_MESSAGES/hu", + "id": "locale/id/LC_MESSAGES/id", + "it": "locale/it/LC_MESSAGES/it", + "ja": "locale/ja/LC_MESSAGES/ja", + "nl": "locale/nl/LC_MESSAGES/nl", + "pt_BR": "locale/pt_BR/LC_MESSAGES/pt_BR", + "ru": "locale/ru/LC_MESSAGES/ru", + "zh": "locale/zh/LC_MESSAGES/zh", + "jquery.browser": "components/jquery.browser/dist/jquery.browser", + "underscore": "components/underscore/underscore", + "backbone": "components/backbone/backbone", + "backbone.browserStorage": "components/backbone.browserStorage/backbone.browserStorage", + "backbone.overview": "components/backbone.overview/backbone.overview", + "bootstrap": "components/bootstrap/dist/js/bootstrap", // XXX: Only required for https://conversejs.org website + "jquery.easing": "components/jquery-easing-original/jquery.easing.1.3", // XXX: Only required for https://conversejs.org website + "strophe": "components/strophe/strophe", + "strophe.muc": "components/strophe.muc/index", + "strophe.roster": "components/strophe.roster/index", + "strophe.vcard": "components/strophe.vcard/index", + "strophe.disco": "components/strophe.disco/index", + "converse-dependencies": "src/deps-website-no-otr", + "moment":"components/momentjs/moment", + "converse-templates":"src/templates", + "tpl": "components/requirejs-tpl-jcbrand/tpl", + "text": "components/requirejs-text/text" + } +}) diff --git a/src/deps-website-no-otr.js b/src/deps-website-no-otr.js new file mode 100644 index 000000000..01623ace3 --- /dev/null +++ b/src/deps-website-no-otr.js @@ -0,0 +1,19 @@ +define("converse-dependencies", [ + "moment", + "locales", + "bootstrap", // XXX: Can be removed, only for https://conversejs.org + "backbone.browserStorage", + "backbone.overview", + "jquery.browser", + "jquery.easing", // XXX: Can be removed, only for https://conversejs.org + "strophe", + "strophe.muc", + "strophe.roster", + "strophe.vcard", + "strophe.disco" +], function(moment) { + return { + 'otr': undefined, + 'moment': moment + }; +});