mirror of
https://github.com/moparisthebest/mail
synced 2024-11-28 11:52:16 -05:00
Merge pull request #319 from whiteout-io/dev/WO-905
[WO-905] Add IMAP compression
This commit is contained in:
commit
8b42f83b35
25
Gruntfile.js
25
Gruntfile.js
@ -171,6 +171,12 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
options: browserifyOpt
|
options: browserifyOpt
|
||||||
},
|
},
|
||||||
|
compressionWorker: {
|
||||||
|
files: {
|
||||||
|
'dist/js/browserbox-compression-worker.browserified.js': ['node_modules/imap-client/node_modules/browserbox/src/browserbox-compression-worker.js']
|
||||||
|
},
|
||||||
|
options: browserifyOpt
|
||||||
|
},
|
||||||
unitTest: {
|
unitTest: {
|
||||||
files: {
|
files: {
|
||||||
'test/unit/index.browserified.js': [
|
'test/unit/index.browserified.js': [
|
||||||
@ -320,6 +326,10 @@ module.exports = function(grunt) {
|
|||||||
src: ['dist/js/tcp-socket-tls-worker.browserified.js'],
|
src: ['dist/js/tcp-socket-tls-worker.browserified.js'],
|
||||||
dest: 'dist/js/tcp-socket-tls-worker.min.js'
|
dest: 'dist/js/tcp-socket-tls-worker.min.js'
|
||||||
},
|
},
|
||||||
|
compressionWorker: {
|
||||||
|
src: ['dist/js/browserbox-compression-worker.browserified.js'],
|
||||||
|
dest: 'dist/js/browserbox-compression-worker.min.js'
|
||||||
|
},
|
||||||
unitTest: {
|
unitTest: {
|
||||||
src: [
|
src: [
|
||||||
'src/lib/underscore/underscore.js',
|
'src/lib/underscore/underscore.js',
|
||||||
@ -403,6 +413,15 @@ module.exports = function(grunt) {
|
|||||||
sourceMapName: 'dist/js/tcp-socket-tls-worker.min.js.map'
|
sourceMapName: 'dist/js/tcp-socket-tls-worker.min.js.map'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
compressionWorker: {
|
||||||
|
files: {
|
||||||
|
'dist/js/browserbox-compression-worker.min.js': ['dist/js/browserbox-compression-worker.min.js']
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
sourceMap: true,
|
||||||
|
sourceMapName: 'dist/js/browserbox-compression-worker.min.js.map'
|
||||||
|
}
|
||||||
|
},
|
||||||
options: {
|
options: {
|
||||||
banner: '/*! Copyright © <%= grunt.template.today("yyyy") %>, Whiteout Networks GmbH.*/\n'
|
banner: '/*! Copyright © <%= grunt.template.today("yyyy") %>, Whiteout Networks GmbH.*/\n'
|
||||||
}
|
}
|
||||||
@ -588,6 +607,8 @@ module.exports = function(grunt) {
|
|||||||
'js/mailreader-parser-worker.min.js.map',
|
'js/mailreader-parser-worker.min.js.map',
|
||||||
'js/tcp-socket-tls-worker.browserified.js',
|
'js/tcp-socket-tls-worker.browserified.js',
|
||||||
'js/tcp-socket-tls-worker.min.js.map',
|
'js/tcp-socket-tls-worker.min.js.map',
|
||||||
|
'js/browserbox-compression-worker.browserified.js',
|
||||||
|
'js/browserbox-compression-worker.min.js.map',
|
||||||
'img/icon-100-ios.png',
|
'img/icon-100-ios.png',
|
||||||
'img/icon-114-ios.png',
|
'img/icon-114-ios.png',
|
||||||
'img/icon-120-ios.png',
|
'img/icon-120-ios.png',
|
||||||
@ -662,15 +683,11 @@ module.exports = function(grunt) {
|
|||||||
grunt.registerTask('dist-js-app', [
|
grunt.registerTask('dist-js-app', [
|
||||||
'browserify:app',
|
'browserify:app',
|
||||||
'browserify:pbkdf2Worker',
|
'browserify:pbkdf2Worker',
|
||||||
'browserify:mailreaderWorker',
|
|
||||||
'browserify:tlsWorker',
|
|
||||||
'exorcise:app',
|
'exorcise:app',
|
||||||
'ngtemplates',
|
'ngtemplates',
|
||||||
'concat:app',
|
'concat:app',
|
||||||
'concat:readSandbox',
|
'concat:readSandbox',
|
||||||
'concat:pbkdf2Worker',
|
'concat:pbkdf2Worker',
|
||||||
'concat:mailreaderWorker',
|
|
||||||
'concat:tlsWorker',
|
|
||||||
'manifest'
|
'manifest'
|
||||||
]);
|
]);
|
||||||
grunt.registerTask('dist-js-unitTest', [
|
grunt.registerTask('dist-js-unitTest', [
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
"grunt-svgmin": "~1.0.0",
|
"grunt-svgmin": "~1.0.0",
|
||||||
"grunt-svgstore": "~0.3.4",
|
"grunt-svgstore": "~0.3.4",
|
||||||
"iframe-resizer": "^2.8.3",
|
"iframe-resizer": "^2.8.3",
|
||||||
"imap-client": "~0.13.0",
|
"imap-client": "~0.14.0",
|
||||||
"jquery": "~2.1.1",
|
"jquery": "~2.1.1",
|
||||||
"mailbuild": "^0.3.7",
|
"mailbuild": "^0.3.7",
|
||||||
"mailreader": "~0.4.0",
|
"mailreader": "~0.4.0",
|
||||||
|
@ -848,6 +848,8 @@ Email.prototype.onConnect = function(imap) {
|
|||||||
|
|
||||||
// tls socket worker path for multithreaded tls in non-native tls environments
|
// tls socket worker path for multithreaded tls in non-native tls environments
|
||||||
credentials.imap.tlsWorkerPath = config.workerPath + '/tcp-socket-tls-worker.min.js';
|
credentials.imap.tlsWorkerPath = config.workerPath + '/tcp-socket-tls-worker.min.js';
|
||||||
|
// enable multithreaded compression handling
|
||||||
|
credentials.imap.compressionWorkerPath = config.workerPath + '/browserbox-compression-worker.min.js';
|
||||||
|
|
||||||
self._imapClient = (imap || new ImapClient(credentials.imap));
|
self._imapClient = (imap || new ImapClient(credentials.imap));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user