Skip to content

Commit 171c743

Browse files
committed
new build
1 parent 486a4eb commit 171c743

12 files changed

+25
-19
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Optimized [PINF](http://pinf.org/)/[CommonJS](http://commonjs.org/) Loader for J
44
*Status: ALPHA* [![Build Status](https://secure.travis-ci.org/sourcemint/loader-js.png)](http://travis-ci.org/sourcemint/loader-js)
55

66
The `Sourcemint JavaScript Loader` is an optimized *(intended for production use)* **CommonJS package mappings**
7-
based **JavaScript module loader** for the browser in only **1589 bytes** *(minified and zipped)*.
7+
based **JavaScript module loader** for the browser in only **1584 bytes** *(minified and zipped)*.
88

99
* Copyright: 2011 [Christoph Dorn](http://www.christophdorn.com/)
1010
* Code License: [MIT](http://www.opensource.org/licenses/mit-license.php) or [MPL](http://mozilla.org/MPL/2.0/)

examples/DevUI.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ require.bundle("", function(require)
4848

4949
exports.main = function(options)
5050
{
51+
options = options || {};
52+
if (typeof options.debug === "undefined")
53+
{
54+
options.debug = true;
55+
}
56+
5157
Q.when(Q.all([
5258
"01-HelloWorld",
5359
"02-ReturnExports",
@@ -69,7 +75,7 @@ require.bundle("", function(require)
6975
{
7076
var result = Q.defer();
7177

72-
require.sandbox("../../examples/" + name + ".js", function(sandbox)
78+
require.sandbox("./" + name + ".js", function(sandbox)
7379
{
7480
try {
7581
Q.when(sandbox.main(options), result.resolve, result.reject);

loader.crush.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

loader.crush.js.gz

3 Bytes
Binary file not shown.

loader.min.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

loader.min.js.gz

-5 Bytes
Binary file not shown.

loader.stripped.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ var sourcemint = null;
4040
function loadInBrowser(uri, loadedCallback) {
4141
// See if we are in a web worker.
4242
if (typeof importScripts !== "undefined") {
43-
importScripts(uri.replace(/^\{host\}/, ""));
43+
importScripts(uri.replace(/^\/?\{host\}/, ""));
4444
loadedCallback();
4545
return;
4646
}
47-
if (/^\{host\}\//.test(uri)) {
48-
uri = document.location.protocol + "//" + document.location.host + uri.substring(6);
47+
if (/^\/?\{host\}\//.test(uri)) {
48+
uri = document.location.protocol + "//" + document.location.host + uri.replace(/^\/?\{host\}/, "");
4949
} else
5050
if (/^\//.test(uri)) {
5151
uri = document.location.protocol + "/" + uri;

workspace/www/loader.crush.js-size

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2247
1+
2237

workspace/www/loader.crush.js.gz-size

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1672
1+
1675

workspace/www/loader.min.js-size

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3624
1+
3644

workspace/www/loader.min.js.gz-size

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1589
1+
1584

workspace/www/loader.stripped.js.md5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
433f3f017e99370000e16edab13fa698
1+
ffb4d5b9d4358f6cfbf57ee4d806bf84

0 commit comments

Comments
 (0)