-
-
Save matehat/345651 to your computer and use it in GitHub Desktop.
This file contains 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
[err, files]: fs.readdir 'test', defer | |
files.forEach (file) -> | |
return unless file.ext is '.coffee' | |
[err, code]: fs.readFile file, defer | |
CoffeeScript.run code | |
=> | |
fs.readdir('test', (function(__this) { | |
var __func = function() { | |
var _a, err, files; | |
_a = (arguments.length > 1 ? Array.prototype.slice(arguments, 0) : arguments[0]); | |
err = _a[0]; | |
files = _a[1]; | |
return files.forEach(function(file) { | |
if (!(file.ext === '.coffee')) { | |
return null; | |
} | |
fs.readFile(file, (function(__this) { | |
var __func = function() { | |
var _b, code; | |
_b = (arguments.length > 1 ? Array.prototype.slice(arguments, 0) : arguments[0]); | |
err = _b[0]; | |
code = _b[1]; | |
return CoffeeScript.run(code); | |
}; | |
return (function() { | |
return __func.apply(__this, arguments); | |
}); | |
})(this)); | |
return null; | |
}); | |
}; | |
return (function() { | |
return __func.apply(__this, arguments); | |
}); | |
})(this)); | |
return null; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment