From 1c6a8de0a3f82c051ff7fe1b4be739a09d9a69af Mon Sep 17 00:00:00 2001 From: David Dan Date: Mon, 27 Oct 2014 15:57:47 -0400 Subject: [PATCH] Removed logs from release issue #2 --- Gruntfile.js | 5 ++++- release/angular-wamp.min.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 00a9840..7e3157f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -61,7 +61,10 @@ module.exports = function (grunt) { // Minify JavaScript uglify: { options: { - preserveComments: 'some' + preserveComments: 'some', + compress: { + drop_console: true + } }, app: { files: { diff --git a/release/angular-wamp.min.js b/release/angular-wamp.min.js index 8ca46a5..1f76343 100644 --- a/release/angular-wamp.min.js +++ b/release/angular-wamp.min.js @@ -1 +1 @@ -"use strict";function $WampProvider(){var a;return this.init=function(b){a=b||{}},this.$get=["$rootScope","$q",function(b,c){function d(a){return function(){var c=a.apply(this,arguments);return b.$apply(),c}}var e,f=[],g=c.defer(),h=function(a,c,d){return b.$broadcast("$wamp.onchallenge",{promise:g,session:a,method:c,extra:d}),g.promise};return a=angular.extend({onchallenge:h},a),e=new autobahn.Connection(a),e.onopen=function(a){console.log("Congrats! You're connected to the WAMP server!"),b.$broadcast("$wamp.open",a);for(var d,e;f.length>0;)d=f.shift(),e=c.when(a[d.method].apply(a,d.args)),d.promise.resolve(e),console.log("processed queued "+d.method)},e.onclose=function(a,c){console.log("Connection Closed: ",a),b.$broadcast("$wamp.close",{reason:a,details:c})},{connection:e,session:e.session,open:function(){e.open()},close:function(){e.close()},subscribe:function(a,b,g){if(b=d(b),!e.isOpen){var h=c.defer();return f.push({method:"subscribe",args:[a,b,g],promise:h}),console.log("connection not open, queuing subscribe"),h.promise}return c.when(e.session.subscribe(a,b,g))},unsubscribe:function(a){if(!e.isOpen){var b=c.defer();return f.push({method:"unsubscribe",args:arguments,promise:b}),console.log("connection not open, queuing unsbuscribe"),b.promise}return c.when(e.session.unsubscribe(a))},publish:function(a,b,d,g){if(!e.isOpen){var h=c.defer();return f.push({method:"publish",args:arguments,promise:h}),console.log("connection not open, queuing publish"),h.promise}return c.when(e.session.publish(a,b,d,g))},register:function(a,b,g){if(b=d(b),!e.isOpen){var h=c.defer();return f.push({method:"register",args:[a,b,g],promise:h}),console.log("connection not open, queuing register"),h.promise}return c.when(e.session.register(a,b,g))},call:function(a,b,d,g){if(!e.isOpen){var h=c.defer();return f.push({method:"call",args:arguments,promise:h}),console.log("connection not open, queuing call"),h.promise}return c.when(e.session.call(a,b,d,g))}}}],this}var vxWampModule=angular.module("vxWamp",[]).provider("$wamp",$WampProvider); \ No newline at end of file +"use strict";function $WampProvider(){var a;return this.init=function(b){a=b||{}},this.$get=["$rootScope","$q",function(b,c){function d(a){return function(){var c=a.apply(this,arguments);return b.$apply(),c}}var e,f=[],g=c.defer(),h=function(a,c,d){return b.$broadcast("$wamp.onchallenge",{promise:g,session:a,method:c,extra:d}),g.promise};return a=angular.extend({onchallenge:h},a),e=new autobahn.Connection(a),e.onopen=function(a){b.$broadcast("$wamp.open",a);for(var d,e;f.length>0;)d=f.shift(),e=c.when(a[d.method].apply(a,d.args)),d.promise.resolve(e)},e.onclose=function(a,c){b.$broadcast("$wamp.close",{reason:a,details:c})},{connection:e,session:e.session,open:function(){e.open()},close:function(){e.close()},subscribe:function(a,b,g){if(b=d(b),!e.isOpen){var h=c.defer();return f.push({method:"subscribe",args:[a,b,g],promise:h}),h.promise}return c.when(e.session.subscribe(a,b,g))},unsubscribe:function(a){if(!e.isOpen){var b=c.defer();return f.push({method:"unsubscribe",args:arguments,promise:b}),b.promise}return c.when(e.session.unsubscribe(a))},publish:function(a,b,d,g){if(!e.isOpen){var h=c.defer();return f.push({method:"publish",args:arguments,promise:h}),h.promise}return c.when(e.session.publish(a,b,d,g))},register:function(a,b,g){if(b=d(b),!e.isOpen){var h=c.defer();return f.push({method:"register",args:[a,b,g],promise:h}),h.promise}return c.when(e.session.register(a,b,g))},call:function(a,b,d,g){if(!e.isOpen){var h=c.defer();return f.push({method:"call",args:arguments,promise:h}),h.promise}return c.when(e.session.call(a,b,d,g))}}}],this}var vxWampModule=angular.module("vxWamp",[]).provider("$wamp",$WampProvider); \ No newline at end of file