rebuilt the narwhal interface

This commit is contained in:
Jeremy Ashkenas
2010-01-10 20:25:09 -05:00
parent 7d2a955e0a
commit a1528f3f19

View File

@@ -20,17 +20,13 @@
// Run a simple REPL, round-tripping to the CoffeeScript compiler for every
// command.
exports.run = function run(args) {
var __a, __b, i, result;
var __a, i, path, result;
if (args.length) {
__a = args;
__b = function(path, i) {
for (i=0; i<__a.length; i++) {
path = __a[i];
exports.evalCS(File.read(path));
delete args[i];
};
if (__a instanceof Array) {
for (i=0; i<__a.length; i++) __b(__a[i], i);
} else {
for (i in __a) { if (__a.hasOwnProperty(i)) __b(__a[i], i); }
}
return true;
}