Commit 512a4637 authored by JC Brand's avatar JC Brand

Create 3 different builds.

* converse.min.js
* converse-no-otr.min.js (Without OTR encryption)
* converse-no-locales-no-otr.min.js (Without OTR encryption or any translations)
parent 039173cf
......@@ -70,15 +70,17 @@ module.exports = function(grunt) {
var done = this.async();
var child_process = require('child_process');
var exec = child_process.exec;
exec('./node_modules/requirejs/bin/r.js -o build.js',
function (err, stdout, stderr) {
if (err) {
grunt.log.write('build failed with error code '+err.code);
grunt.log.write(stderr);
}
grunt.log.write(stdout);
done();
});
var callback = function (err, stdout, stderr) {
if (err) {
grunt.log.write('build failed with error code '+err.code);
grunt.log.write(stderr);
}
grunt.log.write(stdout);
done();
};
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', callback);
});
grunt.registerTask('minify', 'Create a new release', ['cssmin', 'jsmin']);
......
......@@ -35,7 +35,7 @@ help:
@echo " text to make text files"
pot:
xgettext --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot converse.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=0.4 -c --language="python";
xgettext --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot converse.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=0.7.0 -c --language="python";
merge:
find ./locale -maxdepth 1 -mindepth 1 -type d -exec msgmerge {}/LC_MESSAGES/converse.po ./locale/converse.pot -U \;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -12,27 +12,16 @@
console = { log: function () {}, error: function () {} };
}
if (typeof define === 'function' && define.amd) {
define("converse", [
"crypto",
"otr",
"locales",
"backbone.localStorage",
"jquery.tinysort",
"strophe",
"strophe.muc",
"strophe.roster",
"strophe.vcard",
"strophe.disco"
], function(CryptoJS, otr) {
define("converse", ["converse-dependencies"], function(otr) {
// Use Mustache style syntax for variable interpolation
_.templateSettings = {
evaluate : /\{\[([\s\S]+?)\]\}/g,
interpolate : /\{\{([\s\S]+?)\}\}/g
};
if (typeof otr !== "undefined") {
return factory(jQuery, _, CryptoJS, otr.OTR, otr.DSA, console);
return factory(jQuery, _, otr.OTR, otr.DSA, console);
} else {
return factory(jQuery, _, undefined, undefined, undefined, console);
return factory(jQuery, _, undefined, undefined, console);
}
});
} else {
......@@ -41,9 +30,9 @@
evaluate : /\{\[([\s\S]+?)\]\}/g,
interpolate : /\{\{([\s\S]+?)\}\}/g
};
root.converse = factory(jQuery, _, CryptoJS, OTR, DSA, console || {log: function(){}});
root.converse = factory(jQuery, _, OTR, DSA, console || {log: function(){}});
}
}(this, function ($, _, CryptoJS, OTR, DSA, console) {
}(this, function ($, _, OTR, DSA, console) {
var converse = {};
converse.initialize = function (settings, callback) {
var converse = this;
......
......@@ -13,6 +13,11 @@ Changelog
If you are using the development libraries, you'll need to run ```bower update```
to fetch the newest strophe.muc.plugin (for bugfix of #85).
This release contains 3 different builds:
- converse.min.js
- converse-no-otr.min.js (Without OTR encryption)
- converse-no-locales-no-otr.min.js (Without OTR encryption or any translations)
0.7.0 (2013-11-13)
------------------
......
......@@ -8,7 +8,7 @@
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
<link rel="stylesheet" type="text/css" media="screen" href="converse.css">
<!--<script data-main="main" src="components/requirejs/require.js"></script>-->
<script src="converse.min.js"></script>
<script src="builds/converse.min.js"></script>
<title>Converse.js</title>
</head>
......
......@@ -24,9 +24,10 @@ require.config({
"crypto.hmac": "components/otr/vendor/cryptojs/hmac",
"crypto.pad-nopadding": "components/otr/vendor/cryptojs/pad-nopadding",
"crypto.mode-ctr": "components/otr/vendor/cryptojs/mode-ctr",
"crypto": "crypto",
"crypto": "src/crypto",
"eventemitter": "components/otr/build/dep/eventemitter",
"otr": "components/otr/build/otr"
"otr": "components/otr/build/otr",
"converse-dependencies": "src/deps-full"
},
// define module dependencies for modules not using define
......@@ -42,9 +43,6 @@ require.config({
//module value.
exports: 'Backbone'
},
'crypto.aes': {
exports: 'CryptoJS'
},
'jquery.tinysort': { deps: ['jquery'] },
'strophe': { deps: ['jquery'] },
'underscore': { exports: '_' },
......
({
baseUrl: "../",
name: "components/almond/almond.js",
out: "../builds/converse-no-locales-no-otr.min.js",
include: ['main'],
paths: {
"jquery": "components/jquery/jquery",
"jed": "components/jed/jed",
"locales": "locale/nolocales",
"pt_BR": "locale/pt_BR/LC_MESSAGES/pt_BR",
"ru": "locale/ru/LC_MESSAGES/ru",
"jquery.tinysort": "components/tinysort/src/jquery.tinysort",
"underscore": "components/underscore/underscore",
"backbone": "components/backbone/backbone",
"backbone.localStorage": "components/backbone.localStorage/backbone.localStorage",
"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-no-otr"
}
})
({
baseUrl: "../",
name: "components/almond/almond.js",
out: "../builds/converse-no-otr.min.js",
include: ['main'],
paths: {
"jquery": "components/jquery/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",
"hu": "locale/hu/LC_MESSAGES/hu",
"it": "locale/it/LC_MESSAGES/it",
"nl": "locale/nl/LC_MESSAGES/nl",
"pt_BR": "locale/pt_BR/LC_MESSAGES/pt_BR",
"ru": "locale/ru/LC_MESSAGES/ru",
"jquery.tinysort": "components/tinysort/src/jquery.tinysort",
"underscore": "components/underscore/underscore",
"backbone": "components/backbone/backbone",
"backbone.localStorage": "components/backbone.localStorage/backbone.localStorage",
"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-no-otr"
}
})
({
baseUrl: ".",
baseUrl: "../",
name: "components/almond/almond.js",
out: "converse.min.js",
out: "../builds/converse.min.js",
include: ['main'],
paths: {
"jquery": "components/jquery/jquery",
......@@ -39,8 +39,9 @@
"crypto.hmac": "components/otr/vendor/cryptojs/hmac",
"crypto.pad-nopadding": "components/otr/vendor/cryptojs/pad-nopadding",
"crypto.mode-ctr": "components/otr/vendor/cryptojs/mode-ctr",
"crypto": "crypto",
"crypto": "src/crypto",
"eventemitter": "components/otr/build/dep/eventemitter",
"otr": "components/otr/build/otr"
"otr": "components/otr/build/otr",
"converse-dependencies": "src/deps-full"
}
})
define("converse-dependencies", [
"otr",
"locales",
"backbone.localStorage",
"jquery.tinysort",
"strophe",
"strophe.muc",
"strophe.roster",
"strophe.vcard",
"strophe.disco"
], function(otr) {
return otr;
});
define("converse-dependencies", [
"locales",
"backbone.localStorage",
"jquery.tinysort",
"strophe",
"strophe.muc",
"strophe.roster",
"strophe.vcard",
"strophe.disco"
], function() {
return undefined;
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment