diff --git a/browser-source-map-support.js b/browser-source-map-support.js index af2d91b..cb90d1e 100644 --- a/browser-source-map-support.js +++ b/browser-source-map-support.js @@ -30,9 +30,9 @@ c,d){b(this,a,c,!0,d)};e.prototype.writeInt16BE=function(a,c,d){b(this,a,c,!1,d) "string"===typeof a&&(a=a.charCodeAt(0));q("number"===typeof a&&!isNaN(a),"value is not a number");q(c>=b,"end < start");if(c!==b&&0!==this.length)for(q(0<=b&&b"};e.prototype.toArrayBuffer=function(){if("undefined"!==typeof Uint8Array){if(e._useTypedArrays)return(new e(this)).buffer; for(var a=new Uint8Array(this.length),b=0,c=a.length;be)return-1;if(58>e)return e-48+52;if(91>e)return e-65;if(123>e)return e-97+26}var v="undefined"!==typeof Uint8Array? -Uint8Array:Array;e.toByteArray=function(e){function g(c){a[b++]=c}var d,k,l,c,a;if(0>16),g((l&65280)>>8),g(l&255);2===c?(l=p(e.charAt(d))<<2|p(e.charAt(d+1))>>4,g(l&255)):1===c&&(l=p(e.charAt(d))<<10| -p(e.charAt(d+1))<<4|p(e.charAt(d+2))>>2,g(l>>8&255),g(l&255));return a};e.fromByteArray=function(e){var g,d=e.length%3,k="",l,c;g=0;for(c=e.length-d;g>18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l& +a.writeInt32LE=u.writeInt32LE;a.writeInt32BE=u.writeInt32BE;a.writeFloatLE=u.writeFloatLE;a.writeFloatBE=u.writeFloatBE;a.writeDoubleLE=u.writeDoubleLE;a.writeDoubleBE=u.writeDoubleBE;a.fill=u.fill;a.inspect=u.inspect;a.toArrayBuffer=u.toArrayBuffer;return a}},{"base64-js":4,ieee754:5}],4:[function(h,r,m){(function(e){function p(e){e=e.charCodeAt(0);if(43===e||45===e)return 62;if(47===e||95===e)return 63;if(48>e)return-1;if(58>e)return e-48+52;if(91>e)return e-65;if(123>e)return e-97+26}var v="undefined"!== +typeof Uint8Array?Uint8Array:Array;e.toByteArray=function(e){function g(c){a[b++]=c}var d,k,l,c,a;if(0>16),g((l&65280)>>8),g(l&255);2===c?(l=p(e.charAt(d))<<2|p(e.charAt(d+1))>>4,g(l&255)):1===c&&(l= +p(e.charAt(d))<<10|p(e.charAt(d+1))<<4|p(e.charAt(d+2))>>2,g(l>>8&255),g(l&255));return a};e.fromByteArray=function(e){var g,d=e.length%3,k="",l,c;g=0;for(c=e.length-d;g>18&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l>>12&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l>>6&63)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l& 63),k+=l;switch(d){case 1:l=e[e.length-1];k+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l>>2);k+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l<<4&63);k+="==";break;case 2:l=(e[e.length-2]<<8)+e[e.length-1],k+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l>>10),k+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l>>4&63),k+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l<< 2&63),k+="="}return k}})("undefined"===typeof m?this.base64js={}:m)},{}],5:[function(h,r,m){m.read=function(e,p,v,h,g){var d;d=8*g-h-1;var k=(1<>1,c=-7;g=v?g-1:0;var a=v?-1:1,b=e[p+g];g+=a;v=b&(1<<-c)-1;b>>=-c;for(c+=d;0>=-c;for(c+=h;0>1,b= 23===g?Math.pow(2,-24)-Math.pow(2,-77):0;d=h?0:d-1;var z=h?1:-1,D=0>p||0===p&&0>1/p?1:0;p=Math.abs(p);isNaN(p)||Infinity===p?(p=isNaN(p)?1:0,h=c):(h=Math.floor(Math.log(p)/Math.LN2),1>p*(k=Math.pow(2,-h))&&(h--,k*=2),p=1<=h+a?p+b/k:p+b*Math.pow(2,1-a),2<=p*k&&(h++,k/=2),h+a>=c?(p=0,h=c):1<=h+a?(p=(p*k-1)*Math.pow(2,g),h+=a):(p=p*Math.pow(2,a-1)*Math.pow(2,g),h=0));for(;8<=g;e[v+d]=p&255,d+=z,p/=256,g-=8);h=h<",a=this.getLineNumber(),null!=a&&(b+=":"+a,(a=this.getColumnNumber())&&(b+=":"+a)));a="";var c=this.getFunctionName(), -d=!0,e=this.isConstructor();if(this.isToplevel()||e)e?a+="new "+(c||""):c?a+=c:(a+=b,d=!1);else{var e=this.getTypeName(),g=this.getMethodName();c?(e&&0!=c.indexOf(e)&&(a+=e+"."),a+=c,g&&c.indexOf("."+g)!=c.length-g.length-1&&(a+=" [as "+g+"]")):a+=e+"."+(g||"")}d&&(a+=" ("+b+")");return a}function a(a){var b={};Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(function(c){b[c]=/^(?:is|get)/.test(c)?function(){return a[c].call(a)}:a[c]});b.toString=c;return b}function b(b){var c= -b.getFileName()||b.getScriptNameOrSourceURL();if(c){var d=k({source:c,line:b.getLineNumber(),column:b.getColumnNumber()-1});b=a(b);b.getFileName=function(){return d.source};b.getLineNumber=function(){return d.line};b.getColumnNumber=function(){return d.column+1};b.getScriptNameOrSourceURL=function(){return d.source};return b}var e=b.isEval()&&b.getEvalOrigin();e&&(e=l(e),b=a(b),b.getEvalOrigin=function(){return e});return b}function z(a,c){t&&(F={},C={});return a+c.map(function(a){return"\n at "+ -b(a)}).join("")}function D(a){var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b){a=b[1];var c=+b[2],b=+b[3],d=F[a];!d&&y.existsSync(a)&&(d=y.readFileSync(a,"utf8"));if(d&&(d=d.split(/(?:\r\n|\r|\n)/)[c-1]))return"\n"+a+":"+c+"\n"+d+"\n"+Array(b).join(" ")+"^"}return null}function B(a){if(a&&a.stack){var b=D(a);null!==b&&console.log(b);console.log(a.stack)}else console.log("Uncaught exception:",a);e.exit(1)}var E=h("source-map").SourceMapConsumer,w=h("path"),y=h("fs"),H=!1,t=!1,F={},C= -{};m.wrapCallSite=b;m.getErrorSource=D;m.mapSourcePosition=k;m.retrieveSourceMap=d;m.install=function(a){if(!H){H=!0;Error.prepareStackTrace=z;a=a||{};var b="handleUncaughtExceptions"in a?a.handleUncaughtExceptions:!0;t="emptyCacheBetweenOperations"in a?a.emptyCacheBetweenOperations:!1;a.retrieveFile&&(A=a.retrieveFile);a.retrieveSourceMap&&(d=a.retrieveSourceMap);if(b&&!r())e.on("uncaughtException",B)}}}).call(this,h("node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"), -h("buffer").Buffer)},{"node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":6,buffer:3,fs:2,path:7,"source-map":8}]},{},[1]);return K}); +h("node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{"node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":6,path:7}],18:[function(h,r,m){(function(e,p){function r(){return"undefined"!==typeof window&&"function"===typeof XMLHttpRequest}function A(a){if(a in F)return F[a];try{if(r()){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);var c=null;4=== +b.readyState&&200===b.status&&(c=b.responseText)}else c=y.readFileSync(a,"utf8")}catch(d){c=null}return F[a]=c}function g(a,b){if(!a)return b;var c=w.dirname(a),d=/^\w+:\/\/[^\/]*/.exec(c),d=d?d[0]:"";return d+w.resolve(c.slice(d.length),b)}function d(a){var b;a:{var c;if(r()&&(c=new XMLHttpRequest,c.open("GET",a,!1),c.send(null),c=c.getResponseHeader("SourceMap")||c.getResponseHeader("X-SourceMap"))){b=c;break a}c=A(a);for(var d=/^\/\/[#@]\s*sourceMappingURL=([^'"]+)\s*$/mg,e;e=d.exec(c);)b=e;b= +b?b[1]:null}if(!b)return null;"data:application/json;base64,"==b.slice(0,29).toLowerCase()?(a=(new p(b.slice(29),"base64")).toString(),b=null):(b=g(a,b),a=A(b));return a?{url:b,map:a}:null}function k(a){var b=C[a.source];if(!b){var c=d(a.source);c?(b=C[a.source]={url:c.url,map:new E(c.map)},b.map.sourcesContent&&b.map.sources.forEach(function(a,c){var d=b.map.sourcesContent[c];if(d){var e=g(b.url,a);F[e]=d}})):b=C[a.source]={url:null,map:null}}return b&&b.map&&(c=b.map.originalPositionFor(a),null!== +c.source)?(c.source=g(b.url,c.source),c):a}function l(a){var b=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(a);return b?(a=k({source:b[2],line:b[3],column:b[4]-1}),"eval at "+b[1]+" ("+a.source+":"+a.line+":"+(a.column+1)+")"):(b=/^eval at ([^(]+) \((.+)\)$/.exec(a))?"eval at "+b[1]+" ("+l(b[2])+")":a}function c(){var a,b="";this.isNative()?b="native":(a=this.getScriptNameOrSourceURL(),!a&&this.isEval()&&(b=this.getEvalOrigin(),b+=", "),b=a?b+a:b+"",a=this.getLineNumber(),null!=a&&(b+= +":"+a,(a=this.getColumnNumber())&&(b+=":"+a)));a="";var c=this.getFunctionName(),d=!0,e=this.isConstructor();if(this.isToplevel()||e)e?a+="new "+(c||""):c?a+=c:(a+=b,d=!1);else{var e=this.getTypeName(),g=this.getMethodName();c?(e&&0!=c.indexOf(e)&&(a+=e+"."),a+=c,g&&c.indexOf("."+g)!=c.length-g.length-1&&(a+=" [as "+g+"]")):a+=e+"."+(g||"")}d&&(a+=" ("+b+")");return a}function a(a){var b={};Object.getOwnPropertyNames(Object.getPrototypeOf(a)).forEach(function(c){b[c]=/^(?:is|get)/.test(c)? +function(){return a[c].call(a)}:a[c]});b.toString=c;return b}function b(b,c){var d=b.getFileName()||b.getScriptNameOrSourceURL();if(d){var e=b.getLineNumber(),g=b.getColumnNumber()-1;c&&1===e&&(g-=63);var h=k({source:d,line:e,column:g});b=a(b);b.getFileName=function(){return h.source};b.getLineNumber=function(){return h.line};b.getColumnNumber=function(){return h.column+1};b.getScriptNameOrSourceURL=function(){return h.source};return b}var m=b.isEval()&&b.getEvalOrigin();m&&(m=l(m),b=a(b),b.getEvalOrigin= +function(){return m});return b}function z(a,c){t&&(F={},C={});var d=!r()&&c.length&&"module.js"===c[c.length-1].getFileName();return a+c.map(function(a){return"\n at "+b(a,d)}).join("")}function D(a){var b=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(a.stack);if(b){a=b[1];var c=+b[2],b=+b[3],d=F[a];!d&&y.existsSync(a)&&(d=y.readFileSync(a,"utf8"));if(d&&(d=d.split(/(?:\r\n|\r|\n)/)[c-1]))return a+":"+c+"\n"+d+"\n"+Array(b).join(" ")+"^"}return null}function B(a){if(a&&a.stack){var b=D(a);null!== +b&&(console.error(),console.error(b));console.error(a.stack)}else console.error("Uncaught exception:",a);e.exit(1)}var E=h("source-map").SourceMapConsumer,w=h("path"),y=h("fs"),H=!1,t=!1,F={},C={};m.wrapCallSite=b;m.getErrorSource=D;m.mapSourcePosition=k;m.retrieveSourceMap=d;m.install=function(a){if(!H){H=!0;Error.prepareStackTrace=z;a=a||{};var b="handleUncaughtExceptions"in a?a.handleUncaughtExceptions:!0;t="emptyCacheBetweenOperations"in a?a.emptyCacheBetweenOperations:!1;a.retrieveFile&&(A=a.retrieveFile); +a.retrieveSourceMap&&(d=a.retrieveSourceMap);if(b&&!r())e.on("uncaughtException",B)}}}).call(this,h("node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),h("buffer").Buffer)},{"node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":6,buffer:3,fs:2,path:7,"source-map":8}]},{},[1]);return K}); diff --git a/build.js b/build.js index fdbf145..7968c97 100755 --- a/build.js +++ b/build.js @@ -55,7 +55,7 @@ run(coffee + ' --map --compile amd-test/script.coffee', function(error) { // Build the browserify test run(coffee + ' --map --compile browserify-test/script.coffee', function(error) { if (error) throw error; - run(browserify + ' --debug browserify-test/script.js > browserify-test/compiled.js', function(error) { + run(browserify + ' browserify-test/script.js > browserify-test/compiled.js', function(error) { if (error) throw error; }) });