Created
December 7, 2010 18:51
-
-
Save 525c1e21-bd67-4735-ac99-b4b0e5262290/732206 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports = module.exports = class A | |
constructor: -> | |
console.log 'A' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A = require 'test/a.coffee' | |
exports = module.exports = class B extends A | |
constructor: -> | |
super | |
console.log 'B' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
B = require 'test/b.coffee' | |
exports = module.exports = class C extends B | |
constructor: -> | |
super | |
console.log 'C' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { | |
for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } | |
function ctor() { this.constructor = child; } | |
ctor.prototype = parent.prototype; | |
child.prototype = new ctor; | |
child.__super__ = parent.prototype; | |
return child; | |
}; | |
window.modules = window.modules || {}; | |
window.require = (function() { | |
var library, modules, require; | |
library = {}; | |
modules = window.modules; | |
require = function(handle) { | |
var module; | |
if (library.hasOwnProperty(handle)) { | |
return library[name]; | |
} | |
if (!(modules[handle] != null)) { | |
throw "" + handle + " not found"; | |
} | |
module = { | |
exports: {} | |
}; | |
library[handle] = module; | |
modules[handle](require, module, module.exports); | |
return module.exports; | |
}; | |
return require; | |
})(); | |
modules['test/z.coffee'] = function(require, module, exports) { | |
var Z; | |
Z = require('test/z.coffee'); | |
return exports = module.exports = Z = function() { | |
__extends(Z, Z); | |
function Z() { | |
console.log('Z'); | |
} | |
return Z; | |
}(); | |
}; | |
modules['test/a.coffee'] = function(require, module, exports) { | |
var A; | |
return exports = module.exports = A = function() { | |
function A() { | |
console.log('A'); | |
} | |
return A; | |
}(); | |
}; | |
modules['test/b.coffee'] = function(require, module, exports) { | |
var A, B; | |
A = require('test/a.coffee'); | |
return exports = module.exports = B = function() { | |
__extends(B, A); | |
function B() { | |
B.__super__.constructor.apply(this, arguments); | |
console.log('B'); | |
} | |
return B; | |
}(); | |
}; | |
modules['test/c.coffee'] = function(require, module, exports) { | |
var B, C; | |
B = require('test/b.coffee'); | |
return exports = module.exports = C = function() { | |
__extends(C, B); | |
function C() { | |
C.__super__.constructor.apply(this, arguments); | |
console.log('C'); | |
} | |
return C; | |
}(); | |
}; | |
}).call(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# window.modules = window.modules || {} | |
window.require = (-> | |
library = {} | |
modules = window.modules | |
require = (handle) -> | |
return library[name] if library.hasOwnProperty handle | |
throw "#{handle} not found" if !modules[handle]? | |
module = {exports: {}} | |
library[handle] = module | |
modules[handle](require, module, module.exports) | |
return module.exports | |
return require | |
)() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Z = require 'test/z.coffee' | |
exports = module.exports = class Z extends Z | |
constructor: -> | |
console.log 'Z' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment