mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
20 lines
696 B
JavaScript
20 lines
696 B
JavaScript
(function(){
|
|
var coffeescript, factories, loader;
|
|
// This (javascript) file is generated from lib/coffee_script/narwhal/loader.coffee
|
|
coffeescript = null;
|
|
factories = {
|
|
};
|
|
loader = {
|
|
// Reload the coffee-script environment from source.
|
|
reload: function(topId, path) {
|
|
coffeescript = coffeescript || require('coffee-script');
|
|
factories[topId] = coffeescript.makeNarwhalFactory(path);
|
|
return factories[topId];
|
|
},
|
|
// Ensure that the coffee-script environment is loaded.
|
|
load: function(topId, path) {
|
|
return factories[topId] = factories[topId] || this.reload(topId, path);
|
|
}
|
|
};
|
|
require.loader.loaders.unshift([".coffee", loader]);
|
|
})(); |