2024-08-08 17:32:58 -05:00
|
|
|
var repl = {};
|
|
|
|
|
|
|
|
var file = "repl.jj";
|
|
|
|
var last = 0;
|
|
|
|
|
2024-09-26 11:36:09 -05:00
|
|
|
repl.hotreload = function () {
|
2024-08-08 17:32:58 -05:00
|
|
|
if (io.mod(file) > last) {
|
|
|
|
say("REPL:::");
|
|
|
|
last = io.mod(file);
|
|
|
|
var script = io.slurp(file);
|
|
|
|
eval(script);
|
|
|
|
}
|
2024-09-26 11:36:09 -05:00
|
|
|
};
|
2024-08-08 17:32:58 -05:00
|
|
|
|
2024-09-26 11:36:09 -05:00
|
|
|
return { repl: repl };
|