From c1cbb71f039dfe87b62db647d84a2b43cbe30182 Mon Sep 17 00:00:00 2001 From: Wouter Date: Thu, 8 Jan 2015 14:43:58 +0100 Subject: [PATCH 1/2] Add a semicolon at the end of min.bean.js Updated the makefile. It appends as semicolon to the minified version of Bean. This fixes errors when concatinating files in a single script on deploy. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 58c6b64..e8e0824 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ build: boosh component_json boosh: - node make/build.js + node make/build.js && echo ";" >> ./bean.min.js component_json: node make/component.js From 04a0aabf24fcc9e2bdc8dd0c7fe70e7a729e0e32 Mon Sep 17 00:00:00 2001 From: Wouter Date: Thu, 8 Jan 2015 16:01:14 +0100 Subject: [PATCH 2/2] new build --- bean.js | 6 +++--- bean.min.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bean.js b/bean.js index cebf6d0..b612e96 100644 --- a/bean.js +++ b/bean.js @@ -101,13 +101,13 @@ // a whitelist of properties (for different event types) tells us what to check for and copy var commonProps = str2arr('altKey attrChange attrName bubbles cancelable ctrlKey currentTarget ' + 'detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey ' + - 'srcElement target timeStamp type view which propertyName') + 'srcElement target timeStamp type view which propertyName path') , mouseProps = commonProps.concat(str2arr('button buttons clientX clientY dataTransfer ' + - 'fromElement offsetX offsetY pageX pageY screenX screenY toElement')) + 'fromElement offsetX offsetY pageX pageY screenX screenY toElement movementX movementY region')) , mouseWheelProps = mouseProps.concat(str2arr('wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ ' + 'axis')) // 'axis' is FF specific , keyProps = commonProps.concat(str2arr('char charCode key keyCode keyIdentifier ' + - 'keyLocation location')) + 'keyLocation location isComposing code')) , textProps = commonProps.concat(str2arr('data')) , touchProps = commonProps.concat(str2arr('touches targetTouches changedTouches scale rotation')) , messageProps = commonProps.concat(str2arr('data origin source')) diff --git a/bean.min.js b/bean.min.js index 9468752..60449a8 100644 --- a/bean.min.js +++ b/bean.min.js @@ -3,4 +3,4 @@ * https://github.com/fat/bean * MIT license */ -(function(e,t,n){typeof module!="undefined"&&module.exports?module.exports=n():typeof define=="function"&&define.amd?define(n):t[e]=n()})("bean",this,function(e,t){e=e||"bean",t=t||this;var n=window,r=t[e],i=/[^\.]*(?=\..*)\.|.*/,s=/\..*/,o="addEventListener",u="removeEventListener",a=document||{},f=a.documentElement||{},l=f[o],c=l?o:"attachEvent",h={},p=Array.prototype.slice,d=function(e,t){return e.split(t||" ")},v=function(e){return typeof e=="string"},m=function(e){return typeof e=="function"},g="click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll ",y="show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend textinput readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ",b=function(e,t,n){for(n=0;n0){t=d(t);for(f=t.length;f--;)D(e,t[f],n);return e}u=r&&t.replace(s,""),u&&w[u]&&(u=w[u].base);if(!t||r){if(a=r&&t.replace(i,""))a=d(a,".");O(e,u,n,a)}else if(m(t))O(e,null,t);else for(o in t)t.hasOwnProperty(o)&&D(e,o,t[o]);return e},P=function(e,t,n,r){var o,u,a,f,l,v,g;if(n===undefined&&typeof t=="object"){for(u in t)t.hasOwnProperty(u)&&P.call(this,e,u,t[u]);return}m(n)?(l=p.call(arguments,3),r=o=n):(o=r,l=p.call(arguments,4),r=M(n,o,N)),a=d(t),this===h&&(r=A(D,e,t,r,o));for(f=a.length;f--;)g=T.put(v=new x(e,a[f].replace(s,""),r,o,d(a[f].replace(i,""),"."),l,!1)),v[c]&&g&&L(e,v.eventType,!0,v.customType);return e},H=function(e,t,n,r){return P.apply(null,v(n)?[e,n,t,r].concat(arguments.length>3?p.call(arguments,5):[]):p.call(arguments))},B=function(){return P.apply(h,arguments)},j=function(e,t,n){var r=d(t),o,u,a,f,l;for(o=r.length;o--;){t=r[o].replace(s,"");if(f=r[o].replace(i,""))f=d(f,".");if(!f&&!n&&e[c])_(b[t],t,e);else{l=T.get(e,t,null,!1),n=[!1].concat(n);for(u=0,a=l.length;u0){t=d(t);for(f=t.length;f--;)D(e,t[f],n);return e}u=r&&t.replace(s,""),u&&w[u]&&(u=w[u].base);if(!t||r){if(a=r&&t.replace(i,""))a=d(a,".");O(e,u,n,a)}else if(m(t))O(e,null,t);else for(o in t)t.hasOwnProperty(o)&&D(e,o,t[o]);return e},P=function(e,t,n,r){var o,u,a,f,l,v,g;if(n===undefined&&typeof t=="object"){for(u in t)t.hasOwnProperty(u)&&P.call(this,e,u,t[u]);return}m(n)?(l=p.call(arguments,3),r=o=n):(o=r,l=p.call(arguments,4),r=M(n,o,N)),a=d(t),this===h&&(r=A(D,e,t,r,o));for(f=a.length;f--;)g=T.put(v=new x(e,a[f].replace(s,""),r,o,d(a[f].replace(i,""),"."),l,!1)),v[c]&&g&&L(e,v.eventType,!0,v.customType);return e},H=function(e,t,n,r){return P.apply(null,v(n)?[e,n,t,r].concat(arguments.length>3?p.call(arguments,5):[]):p.call(arguments))},B=function(){return P.apply(h,arguments)},j=function(e,t,n){var r=d(t),o,u,a,f,l;for(o=r.length;o--;){t=r[o].replace(s,"");if(f=r[o].replace(i,""))f=d(f,".");if(!f&&!n&&e[c])_(b[t],t,e);else{l=T.get(e,t,null,!1),n=[!1].concat(n);for(u=0,a=l.length;u