xmpp.chapril.org-conversejs/Gruntfile.js
JC Brand aee232421c Properly tear down when logging out or disconnecting.
Remove interval handler and the user activity handler.
Make sure the connection is reset when logging out.
Also removed the reconnectTimeout, instead debounce the reconnect method by 1 second.
2016-04-08 09:02:06 +00:00

54 lines
1.8 KiB
JavaScript

module.exports = function(grunt) {
grunt.initConfig({
jst: {
compile: {
options: {
namespace: 'templates',
templateSettings: {
evaluate : /\{\[([\s\S]+?)\]\}/g,
interpolate : /\{\{([\s\S]+?)\}\}/g
},
processName: function (filepath) {
// E.g. src/templates/trimmed_chat.html
return filepath.match(/src\/templates\/([a-z_]+)\.html/)[1];
}
},
files: {
"dist/templates.js": ["src/templates/*.html"]
},
}
},
cssmin: {
options: {
banner: "/*"+
" * Converse.js (Web-based XMPP instant messaging client) \n"+
" * http://conversejs.org \n"+
" * Copyright (c) 2012, Jan-Carel Brand <jc@opkode.com> \n"+
" * Dual licensed under the MIT and GPL Licenses \n"+
" */"
},
minify: {
dest: 'css/converse.min.css',
src: ['css/converse.css']
}
},
json: {
main: {
options: {
namespace: 'locales',
includePath: true,
processName: function(filename) {
return filename.toLowerCase().match(/^locale\/(.*)\/lc_messages/)[1];
}
},
src: ['locale/**/LC_MESSAGES/*.json'],
dest: 'dist/locales.js'
}
}
});
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-jst');
grunt.loadNpmTasks('grunt-json');
};