mirror of
https://github.com/moparisthebest/mail
synced 2024-11-21 16:35:04 -05:00
integrated imap-client amd branch
This commit is contained in:
parent
5f4c923a09
commit
7b532f780c
17
Gruntfile.js
17
Gruntfile.js
@ -120,7 +120,22 @@ module.exports = function(grunt) {
|
||||
expand: true,
|
||||
flatten: true,
|
||||
cwd: 'node_modules/',
|
||||
src: ['crypto-lib/node_modules/node-forge/js/*.js'],
|
||||
src: [
|
||||
'crypto-lib/node_modules/node-forge/js/*.js',
|
||||
'imap-client/src/*.js',
|
||||
'imap-client/node_modules/inbox/src/*.js',
|
||||
'imap-client/node_modules/setimmediate/setImmediate.js',
|
||||
'imap-client/node_modules/inbox/node_modules/node-shims/src/*.js',
|
||||
'imap-client/node_modules/inbox/node_modules/utf7/src/utf7.js',
|
||||
'imap-client/node_modules/inbox/node_modules/xoauth2/src/xoauth2.js',
|
||||
'imap-client/node_modules/mimelib/src/mimelib.js',
|
||||
'imap-client/node_modules/mimelib/node_modules/addressparser/src/addressparser.js',
|
||||
'imap-client/node_modules/mimelib/node_modules/encoding/src/encoding.js',
|
||||
'imap-client/node_modules/mimelib/node_modules/encoding/node_modules/iconv-lite/src/*.js',
|
||||
'imap-client/node_modules/mimelib/node_modules/encoding/node_modules/mime/src/*.js',
|
||||
'imap-client/node_modules/mailparser/src/*.js',
|
||||
'imap-client/node_modules/mailparser/node_modules/mime/src/mime.js'
|
||||
],
|
||||
dest: 'src/lib/'
|
||||
},
|
||||
npmDev: {
|
||||
|
@ -11,7 +11,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"crypto-lib": "https://github.com/whiteout-io/crypto-lib/tarball/master",
|
||||
"imap-client": "git+ssh://git@github.com:whiteout-io/imap-client.git#builtins",
|
||||
"imap-client": "git+ssh://git@github.com:whiteout-io/imap-client.git#amd",
|
||||
"smtp-client": "git+ssh://git@github.com:whiteout-io/smtp-client.git#master"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -7,10 +7,6 @@ cd `dirname $0`
|
||||
cd ..
|
||||
|
||||
# build imap/smtp modules and copy
|
||||
cd ./node_modules/imap-client/
|
||||
node build.js && cp ./src-gen/*.js ../../src/lib/
|
||||
cd ../../
|
||||
|
||||
cd ./node_modules/smtp-client/
|
||||
node build.js && cp ./src-gen/*.js ../../src/lib/
|
||||
cd ../../
|
||||
|
@ -5,8 +5,8 @@ define(function(require) {
|
||||
'use strict';
|
||||
|
||||
var $ = require('jquery'),
|
||||
ImapClient = require('ImapClient'),
|
||||
SmtpClient = require('SmtpClient'),
|
||||
ImapClient = require('imap-client'),
|
||||
SmtpClient = require('smtp-client'),
|
||||
EmailDAO = require('js/dao/email-dao'),
|
||||
KeychainDAO = require('js/dao/keychain-dao'),
|
||||
cloudstorage = require('js/dao/cloudstorage-dao'),
|
||||
|
@ -80,7 +80,7 @@
|
||||
|
||||
if (typeof define !== 'undefined' && define.amd) {
|
||||
// AMD
|
||||
define(['forge'], function(forge) {
|
||||
define(['node-forge'], function(forge) {
|
||||
return new AesCBC(forge);
|
||||
});
|
||||
} else if (typeof module !== 'undefined' && module.exports) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* A Wrapper for Forge's PBKDF2 function
|
||||
*/
|
||||
define(['forge'], function(forge) {
|
||||
define(['node-forge'], function(forge) {
|
||||
'use strict';
|
||||
|
||||
var self = {};
|
||||
|
@ -129,7 +129,7 @@
|
||||
|
||||
if (typeof define !== 'undefined' && define.amd) {
|
||||
// AMD
|
||||
define(['forge', 'cryptoLib/util', 'js/app-config'], function(forge, util, app) {
|
||||
define(['node-forge', 'cryptoLib/util', 'js/app-config'], function(forge, util, app) {
|
||||
return new RSA(forge, util, app);
|
||||
});
|
||||
} else if (typeof module !== 'undefined' && module.exports) {
|
||||
|
@ -196,7 +196,7 @@
|
||||
|
||||
if (typeof define !== 'undefined' && define.amd) {
|
||||
// AMD
|
||||
define(['uuid', 'forge'], function(uuid, forge) {
|
||||
define(['uuid', 'node-forge'], function(uuid, forge) {
|
||||
return new Util(forge, uuid, undefined);
|
||||
});
|
||||
} else if (typeof module !== 'undefined' && module.exports) {
|
||||
|
@ -6,6 +6,8 @@
|
||||
paths: {
|
||||
js: '../js',
|
||||
test: '../../test',
|
||||
'node-forge': 'forge',
|
||||
'setimmediate': 'setImmediate',
|
||||
cryptoLib: '../js/crypto',
|
||||
jquery: 'jquery-1.8.2.min',
|
||||
underscore: 'underscore-1.4.4.min',
|
||||
@ -13,8 +15,7 @@
|
||||
lawnchairSQL: 'lawnchair/lawnchair-adapter-webkit-sqlite-git',
|
||||
lawnchairIDB: 'lawnchair/lawnchair-adapter-indexed-db-git',
|
||||
cordova: 'cordova-2.5.0',
|
||||
ImapClient: 'imap-client-browserified',
|
||||
SmtpClient: 'smtp-client-browserified',
|
||||
'smtp-client': 'smtp-client-browserified',
|
||||
angular: 'angular/angular.min',
|
||||
angularRoute: 'angular/angular-route.min',
|
||||
angularTouch: 'angular/angular-touch.min',
|
||||
|
@ -3,8 +3,8 @@ define(function(require) {
|
||||
|
||||
var KeychainDAO = require('js/dao/keychain-dao'),
|
||||
EmailDAO = require('js/dao/email-dao'),
|
||||
SmtpClient = require('SmtpClient'),
|
||||
ImapClient = require('ImapClient'),
|
||||
SmtpClient = require('smtp-client'),
|
||||
ImapClient = require('imap-client'),
|
||||
app = require('js/app-config'),
|
||||
expect = chai.expect;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['forge', 'cryptoLib/util', 'test/test-data'], function(forge, util, testData) {
|
||||
define(['node-forge', 'cryptoLib/util', 'test/test-data'], function(forge, util, testData) {
|
||||
'use strict';
|
||||
|
||||
module("Forge Crypto");
|
||||
|
Loading…
Reference in New Issue
Block a user