From 21d2be8658dc29592c982f91b3a7b157c98a7bd6 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 26 Mar 2014 14:54:03 +0400 Subject: [PATCH] Added uglify --- app/js/lib/mtproto.js | 6 ++++-- gulpfile.js | 2 +- package.json | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/js/lib/mtproto.js b/app/js/lib/mtproto.js index 3a640a8e..f9fb040d 100644 --- a/app/js/lib/mtproto.js +++ b/app/js/lib/mtproto.js @@ -997,7 +997,9 @@ factory('MtpRsaKeysManager', function () { }; }). -service('MtpSecureRandom', SecureRandom). +service('MtpSecureRandom', function () { + return new SecureRandom(); +}). factory('MtpMessageIdGenerator', function (AppConfigManager) { var lastMessageID = [0, 0], @@ -2475,7 +2477,7 @@ factory('MtpApiManager', function (AppConfigManager, MtpAuthorizer, MtpNetworker AppConfigManager.set({dc: baseDcID = newDcID}); } - mtpGetNetworker(newDcID).then(function (networker) { + mtpGetNetworker(newDcID, options).then(function (networker) { networker.wrapApiCall(method, params, options).then(function (result) { deferred.resolve(result); }, function (error) { diff --git a/gulpfile.js b/gulpfile.js index a81ed526..9feb1b37 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -21,7 +21,7 @@ gulp.task('usemin', ['templates', 'enable-production'], function() { return gulp.src('app/index.html') .pipe($.usemin({ html: [$.minifyHtml({empty: true})], - js: ['concat', $.rev()], + js: [$.ngmin(), $.uglify(), 'concat', $.rev()], css: [$.minifyCss(), 'concat'] })) .pipe(gulp.dest('dist')); diff --git a/package.json b/package.json index d59b6ec6..055b59dd 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "gulp-grep-stream": "0.0.2", "event-stream": "^3.1.0", "gulp-zip": "^0.1.2", - "gulp-manifest": "0.0.3" + "gulp-manifest": "0.0.3", + "gulp-ngmin": "~0.1.2" } }