Skip to content

Instantly share code, notes, and snippets.

@cadorn
Created November 13, 2010 00:56
Show Gist options
  • Save cadorn/674980 to your computer and use it in GitHub Desktop.
Save cadorn/674980 to your computer and use it in GitHub Desktop.
requirejs package mappings
define("87A2FC545DE0A1C3918CCC52B8AB3AC9!/package3", ["require", "module", "exports"], function(require, module, exports) {
var PACKAGE2 = require("package2/package2");
exports.announceNext = function (console) {console.log("Chrome Package 3");PACKAGE2.announcePrevious(console);};
});
define("F30B57B6CF848463FC10711298FFB063!/package2", ["require", "module", "exports"], function(require, module, exports) {
var PACKAGE1 = require("packageA/package1");
var PACKAGE3 = require("packageB/package3");
exports.announceNext = function (console) {console.log("Chrome Package 2");PACKAGE3.announceNext(console);};
exports.announcePrevious = function (console) {console.log("Chrome Package 2");PACKAGE1.announcePrevious(console);};
});
define("A73864DD7A5B2DE6253CE992F9FAD251!/package1", ["require", "module", "exports"], function(require, module, exports) {
var PACKAGE2 = require("package2/package2");
exports.announceNext = function (console) {console.log("Chrome Package 1");PACKAGE2.announceNext(console);};
exports.announcePrevious = function (console) {console.log("Chrome Package 1");};
});
define("A73864DD7A5B2DE6253CE992F9FAD251!/main", ["require", "module", "exports"], function(require, module, exports) {
exports.main = function () {var console = console || {log: function (msg) {print(msg);}};var PACKAGE1 = require("./package1");PACKAGE1.announceNext(console);};
});
define("87A2FC545DE0A1C3918CCC52B8AB3AC9!/package.json", [], function() {
return {
"mappings": {
"package2": {
"id": "F30B57B6CF848463FC10711298FFB063"
}
}
};
});
define("F30B57B6CF848463FC10711298FFB063!/package.json", [], function() {
return {
"mappings": {
"packageA": {
"id": "A73864DD7A5B2DE6253CE992F9FAD251"
},
"packageB": {
"id": "87A2FC545DE0A1C3918CCC52B8AB3AC9"
}
}
};
});
define("A73864DD7A5B2DE6253CE992F9FAD251!/package.json", [], function() {
return {
"mappings": {
"package2": {
"id": "F30B57B6CF848463FC10711298FFB063"
}
}
};
});
require({baseUrl: "/chrome-program/" }, ["A73864DD7A5B2DE6253CE992F9FAD251!/main"], function(MAIN) {
require.ready(function() {
MAIN.main();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment