I have a Rails app with a CoffeeScript file. The Rails Asset Pipeline compiles it into a JavaScript file.
I'd like to open up the Chrome Developer Tools JavaScript Console and execute functions defined in my .coffee
file.
However in the compiled JS it's all wrapped up like this...
(function() {
var youLot = function() {
return "Wot?";
};
}).call(this);
So what happens in the JS console...
youLot();
ReferenceError: youLot is not defined
Without going through too many contortions, is there a way I can call youLot()
in the Chrome JS console even though I originally declared it in a CoffeeScript file?