mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
the narwhal integration written in JavaScript has been replaced with CoffeeScript, and compiler-generated variable names now start with '__'
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
var coffeescript = null;
|
||||
|
||||
function CoffeeScriptLoader() {
|
||||
var loader = {};
|
||||
var factories = {};
|
||||
|
||||
(function(){
|
||||
var coffeescript = null;
|
||||
var CoffeeScriptLoader = function() {
|
||||
var loader = {
|
||||
};
|
||||
var factories = {
|
||||
};
|
||||
loader.reload = function(topId, path) {
|
||||
if (!coffeescript) coffeescript = require("coffee-script");
|
||||
|
||||
//print("loading objective-j: " + topId + " (" + path + ")");
|
||||
factories[topId] = coffeescript.make_narwhal_factory(path);
|
||||
}
|
||||
|
||||
coffeescript = coffeescript || require('coffee-script');
|
||||
// print("loading objective-j: " + topId + " (" + path + ")");
|
||||
factories[topId] = coffeescript.make_narwhal_factory(path);
|
||||
return factories[topId];
|
||||
};
|
||||
loader.load = function(topId, path) {
|
||||
if (!factories.hasOwnProperty(topId))
|
||||
loader.reload(topId, path);
|
||||
return factories[topId];
|
||||
}
|
||||
|
||||
if (!(factories.hasOwnProperty(topId))) {
|
||||
loader.reload(topId, path);
|
||||
}
|
||||
return factories[topId];
|
||||
};
|
||||
return loader;
|
||||
};
|
||||
|
||||
require.loader.loaders.unshift([".cs", CoffeeScriptLoader()]);
|
||||
};
|
||||
require.loader.loaders.unshift([".cs", CoffeeScriptLoader()]);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user