Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

new build

  • Loading branch information...
commit 098536b3b1728319debfe6cf329162be39c2d413 1 parent ef84f53
@cadorn cadorn authored
View
2  README.md
@@ -4,7 +4,7 @@ Optimized [PINF](http://pinf.org/)/[CommonJS](http://commonjs.org/) Loader for J
*Status: ALPHA* [![Build Status](https://secure.travis-ci.org/sourcemint/loader-js.png)](http://travis-ci.org/sourcemint/loader-js)
The `Sourcemint JavaScript Loader` is an optimized *(intended for production use)* **CommonJS package mappings**
-based **JavaScript module loader** for the browser in only **1584 bytes** *(minified and zipped)*.
+based **JavaScript module loader** for the browser in only **1583 bytes** *(minified and zipped)*.
* Copyright: 2011 [Christoph Dorn](http://www.christophdorn.com/)
* Code License: [MIT](http://www.opensource.org/licenses/mit-license.php) or [MPL](http://mozilla.org/MPL/2.0/)
View
2  examples/10-Sandbox.js
@@ -13,7 +13,7 @@ require.bundle("", function(require)
module.log("Hello from 10-Sandbox!");
- var url = require.sandbox.id + require.id("./SandboxedExtraBundle");
+ var url = "." + require.id("./SandboxedExtraBundle");
require.sandbox(url, function(sandbox)
{
View
2  examples/DevUI.js
@@ -75,7 +75,7 @@ require.bundle("", function(require)
{
var result = Q.defer();
- require.sandbox("./" + name + ".js", function(sandbox)
+ require.sandbox("../" + name + ".js", function(sandbox)
{
try {
Q.when(sandbox.main(options), result.resolve, result.reject);
View
2  loader.crush.js
@@ -1 +1 @@
-_=',=9;((u,eh=[],v={ed:1,Qractive:1,compVQ:1},w n,l,d c,d5importSHs)importSHs/,6),d(else{/a)?a`"//"+host+a/,6:/^a)&&` +aoG(o=e.getEVmAsByTagName("head")b=e.cKaQEVmA("sH"b.type="Qxt/javasH";b.W=b#Xa=aGu.evA;5""===a.typeGv[>.KadyStaQ])>.W=>#=>.Werror=9,d((b.parANode.KmoveChild(b;b.Werror };b.charset="utf-8";bZ=!0;b.src=a;b=o.sertBefoK(b,o.firstChild} s,g,b""!==g&&=( +g+ +a)+/g, )p?b(j):m?m.push(b):(m=[],a=n+a,(4Gd.Gc),(cdeVQ 4;t,gb(jc&&c() t,dfor(b  h[1])"undefed"= gD&&(g[d+b]=h[1]Dh.shift(g=7p=7q=7o,m=7jJn},rX5q)q;c=g[a+"/p_.jsW"]G{F:"/F.js"},b=c.mappgsG7e=c.diKctoriesG7h=e.lib&&""!=e.lib?e.lib+ :"",kJa,F:c.F},lX c-1===a ).pop().dexOf(".")?a+=".js":/^a)G= +aa} e5/^\\./.Qst))a=a^\\./,6"../"),a= +h.slice(1,h-a+1).cWcat[a-1]).jo( ),[k,c)];a=a Kturn[r(b[a]),c.slice(1).jo( ))]}h=a[^]*$/,6 ),fJa,:7:,b5"strg"! a)f%Z.call(9,a,ba=ea%[1]).}};f%f%YXa=ea%Y[1];f%Z a,ba=ea.[1],b;f% 3===&&([2].=[2].Gd./^\\./.Qst()&&(=n[^]*$/,6+ +,=\\./g, ).apply(9,;f%Y=n;f%.nameToUrlXn+f%Y;f. 5""= gbJfY,:void 0};5ModuV)ModuV(b,f,k,jc=g(f%,f.,bb.?f.=b.:c&&(f.=celse f.="strg"= g?decodeURICompWA(g):g};f};k. b,cs((!/^b)? +h:6+b,a,(c(k%(b).;k% bc;@b=a+b;pDG(pD=l(b)).(5mDc=mD;deVQ mD;for(i=0;i<c;i++)c[i](jpD};k%Y b@Kturn((""!==a? +a+ :6+b)+/g, ;5P_)P_(k,j,{falizeLoad:t,moduVInitializers:g}q=k};j%Xr(6%;j.F a=j%(r(6.F).;a.F?a.F.apply(9,):void 0};s(".js","",lj}; e=7l >.bundV c,de=7g=new l(cg.memoize c,de[c]=d};d(gh.push([c,e]},d=new l;dd c,d,hc=c\\.js$/,""e[c]=w(c,d,hG{};d}(G(="object"= &&(%=)(>,documA?documA:9functiWKquiKKturn "undefed"! exportsargumAs.Kplace(//.Qst( ==typeof =( "/"sourcemtvar load){);^?\\{host\\}.supports=["ucjs2-pf-0"];[0].Vngth(a[a]in.sandboxd.WInit\\/e.locatiW.)}.split(#.WKadystaQchange%.4d.rootBundVLoader5if(6"")7{},9null>this@/^b)G(b= +h+bAentD[b]FmaG||HcriptJ={id:KreQteVleWonX aY.idZ.async_ackage`=protocol+';for(Y=0;$='`_ZYXWVQKJHGFDA@>97654%# '[Y++];)with(_.split($))_=join(pop());eval(_)
View
BIN  loader.crush.js.gz
Binary file not shown
View
8 loader.min.js
@@ -3,7 +3,7 @@ var require,sourcemint=null;
v[this.readyState])this.onload=this.onreadystatechange=this.onerror=null,d(function(){b.parentNode.removeChild(b)})};b.onerror=function(){};b.charset="utf-8";b.async=!0;b.src=a;b=o.insertBefore(b,o.firstChild)}}function s(a,g,b){""!==g&&(a=("/"+g+"/"+a).replace(/\/+/g,"/"));p[a]?b(j):m[a]?m[a].push(b):(m[a]=[],a=n+a,(d.rootBundleLoader||d.load||c)(a,function(c){delete d.rootBundleLoader;t(a,g);b(j);c&&c()}))}function t(a,d){for(var b in h[0][1])"undefined"===typeof g[b]&&(g[d+b]=h[0][1][b]);h.shift()}
var g={},p={},q={},o,m={},j={id:n},r=function(a){if(q[a])return q[a];var c=g[a+"/package.json"]||{main:"/main.js"},b=c.mappings||{},e=c.directories||{},h="undefined"!==typeof e.lib&&""!=e.lib?e.lib+"/":"",k={id:a,main:c.main},l=function(a){function c(a){-1===a.split("/").pop().indexOf(".")?a+=".js":/^\//.test(a)||(a="/"+a);return a}function e(a){if(/^\./.test(a))return a=a.replace(/^\.\//,"").split("../"),a="/"+h.slice(1,h.length-a.length+1).concat(a[a.length-1]).join("/"),[k,c(a)];a=a.split("/");
return[r(b[a[0]]),c(a.slice(1).join("/"))]}var h=a.replace(/\/[^\/]*$/,"").split("/"),f={id:a,exports:{},require:function(a,b){if("string"!==typeof a)return f.require.async.call(null,a[0],b);a=e(a);return a[0].require(a[1]).exports}};f.require.supports=["ucjs2-pinf-0"];f.require.id=function(a){a=e(a);return a[0].require.id(a[1])};f.require.async=function(a,b){a=e(a);a[0].load(a[1],b)};f.require.sandbox=function(){3===arguments.length&&(arguments[2].load=arguments[2].load||d.load);/^\./.test(arguments[0])&&
-(arguments[0]=n.replace(/\/[^\/]*$/,"")+"/"+arguments[0],arguments[0]=arguments[0].replace(/\/\.\//g,"/"));return sourcemint.sandbox.apply(null,arguments)};f.require.sandbox.id=n;f.require.nameToUrl=function(a){return n+f.require.id(a)};f.load=function(){if("function"===typeof g[a]){var b={id:f.id,exports:void 0};if(d.onInitModule)d.onInitModule(b,f,k,j);var c=g[a](f.require,f.exports,b);"undefined"!==typeof b.exports?f.exports=b.exports:"undefined"!==typeof c&&(f.exports=c)}else f.exports="string"===
-typeof g[a]?decodeURIComponent(g[a]):g[a]};return f};k.load=function(b,c){s((!/^\//.test(b)?"/"+h:"")+b,a,function(){c(k.require(b).exports)})};k.require=function(b){var c;/^\//.test(b)||(b="/"+h+b);b=a+b;p[b]||(p[b]=l(b)).load();if(m[b]){c=m[b];delete m[b];for(i=0;i<c.length;i++)c[i](j)}return p[b]};k.require.id=function(b){/^\//.test(b)||(b="/"+h+b);return((""!==a?"/"+a+"/":"")+b).replace(/\/+/g,"/")};if(d.onInitPackage)d.onInitPackage(k,j,{finalizeLoad:t,moduleInitializers:g});return q[a]=k};j.require=
-function(a){return r("").require(a)};j.main=function(){var a=j.require(r("").main).exports;return a.main?a.main.apply(null,arguments):void 0};s(".js","",l);return j};sourcemint=function(){var e={},l=function(){this.bundle=function(c,d){var e={},g=new l(c);g.memoize=function(c,d){e[c]=d};d(g);h.push([c,e])}},d=new l;d.supports=["ucjs2-pinf-0"];d.sandbox=function(c,d,h){c=c.replace(/\.js$/,"");return e[c]=w(c,d,h||{})};return d}();require||(require=sourcemint);"object"===typeof exports&&(exports.require=
-sourcemint)})(this,"undefined"!==typeof document?document:null);
+g[a]};return f};k.load=function(b,c){s((!/^\//.test(b)?"/"+h:"")+b,a,function(){c(k.require(b).exports)})};k.require=function(b){var c;/^\//.test(b)||(b="/"+h+b);b=a+b;p[b]||(p[b]=l(b)).load();if(m[b]){c=m[b];delete m[b];for(i=0;i<c.length;i++)c[i](j)}return p[b]};k.require.id=function(b){/^\//.test(b)||(b="/"+h+b);return((""!==a?"/"+a+"/":"")+b).replace(/\/+/g,"/")};if(d.onInitPackage)d.onInitPackage(k,j,{finalizeLoad:t,moduleInitializers:g});return q[a]=k};j.require=function(a){return r("").require(a)};
+j.main=function(){var a=j.require(r("").main).exports;return a.main?a.main.apply(null,arguments):void 0};s(".js","",l);return j};sourcemint=function(){var e={},l=function(){this.bundle=function(c,d){var e={},g=new l(c);g.memoize=function(c,d){e[c]=d};d(g);h.push([c,e])}},d=new l;d.supports=["ucjs2-pinf-0"];d.sandbox=function(c,d,h){c=c.replace(/\.js$/,"");return e[c]=w(c,d,h||{})};return d}();require||(require=sourcemint);"object"===typeof exports&&(exports.require=sourcemint)})(this,"undefined"!==
+typeof document?document:null);
View
BIN  loader.min.js.gz
Binary file not shown
View
2  loader.stripped.js
@@ -206,7 +206,7 @@ var sourcemint = null;
// If the `programIdentifier` (first argument) is relative it is resolved against the URI of the owning sandbox (not the owning page).
if (/^\./.test(arguments[0]))
{
- arguments[0] = sandboxIdentifier.replace(/\/[^\/]*$/, "") + "/" + arguments[0];
+ arguments[0] = sandboxIdentifier + "/" + arguments[0];
// HACK: Temporary hack as zombie (https://github.com/assaf/zombie) does not normalize path before sending to server.
arguments[0] = arguments[0].replace(/\/\.\//g, "/");
}
View
2  workspace/www/loader.crush.js-size
@@ -1 +1 @@
-2237
+2226
View
2  workspace/www/loader.crush.js.gz-size
@@ -1 +1 @@
-1675
+1672
View
2  workspace/www/loader.min.js-size
@@ -1 +1 @@
-3644
+3620
View
2  workspace/www/loader.min.js.gz-size
@@ -1 +1 @@
-1584
+1583
View
2  workspace/www/loader.stripped.js.md5
@@ -1 +1 @@
-ffb4d5b9d4358f6cfbf57ee4d806bf84
+ac623cb21471fa8abc68df8ba0e438af
Please sign in to comment.
Something went wrong with that request. Please try again.